Thread: Auto-arrange
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett[_2_] Don Guillett[_2_] is offline
external usenet poster
 
Posts: 1,522
Default Auto-arrange

Right click sheet tabview codeinsert this. Now when you add a date
at the BOTTOM of col G, Col G will sort. If you want the other way,
change xlAscending to xlDEScending

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Or Target.Column < 7 Then Exit Sub
Range("g1:G" & Target.Row).Sort _
Key1:=Range("G1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, Orientation:=xlTopToBottom
End Sub



On Feb 3, 4:54*pm, Mattaphylactic <Mattaphylactic.
wrote:
Hello all, I am quite new to spreadsheets and was wondering if anybody
could help me with this problem. I have attached an image of what I'm
working on. Ideally, when I enter new data, the rows should
automatically arrange themselves oldest to newest by the date in column
G. As far as I know, this has to be done with code? Could someone point
me in the right direction as I have no experience with this.

Thanks again.

+-------------------------------------------------------------------+
|Filename: excelhelp3.jpg * * * * * * * * * * * * * * * * * * * * * |
|Download:http://www.excelbanter.com/attachment.php?attachmentid=288|
+-------------------------------------------------------------------+

--
Mattaphylactic