Excel, Auto sort a colomb

Soldato
Joined
1 Dec 2004
Posts
23,050
Location
S.Wales
I have a colomb in excel, ranging from G4- G23 which i have sorted in ascending order, but everytime i change some data, it does not automatically update the sort. Is there a way to do this??

Iv search but the only way i can find it is by doing Macro's..
 
Also would like to have different cell colours for the ranges of the value...e.g..red for values ranging from 1-10, Orange for 10-45 etcl... can this be done? keeping in mind it will need to be updated easily..
 
So to start off, view code of the worksheet, i have pasted this..



Private Sub Workbook_SheetChange(ByVal Sh As Object, _
ByVal Source As Range)

Worksheets("Sheet1").Range("G4:G23").Sort _
Key1:=Worksheets("Sheet1").Range("G4")



End Sub



Do i need to amend anything to that?

I want to get the autosort working first..
 
Still dont work...Iv added that code to the sheet1 code, saved it, tried updating a cell and it dont work..

Do i need to amend any of that code you gave me??
 
Back
Top Bottom