Link to home
Start Free TrialLog in
Avatar of ncomper
ncomper

asked on

Sort data by Date based on 4 column worksheet (Excel 2003)

Hi

I have a worksheet in Excel 2003 that contains about 400 rows, (i have pasted 2 rowns below)

Colum 4 contains a date, i would like all data sorted by date order based upon this row, i was playing around myself however i managed to get column 4 in date order however colums 1 -3  never changed order so meant all my data was out of sync, can anybody tell me how to do it

Thanks

Full Path                    Size                 Allocated            Last Change    

E:\Users\GriffithsD\      14969.5 MB      9414.4 MB      03/03/2011            
E:\Users\EllisD\       7806.9 MB      5838.3 MB      04/03/2011                        
ASKER CERTIFIED SOLUTION
Avatar of spattewar
spattewar

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Here is some VBA code if you prefer to do it that way:
Sub sortdata()

    Columns("A:D").Select
    Selection.Sort Key1:=Range("D2"), Order1:=xlAscending, Header:=xlGuess, _
        OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
        DataOption1:=xlSortNormal
    Range("A1").Select
    
End Sub

Open in new window

Avatar of ncomper
ncomper

ASKER

Thanks all, doing it via data-sort worked perfect