Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 302
  • Last Modified:

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                        
0
ncomper
Asked:
ncomper
1 Solution
 
spattewarCommented:
Select your entire data set starting from column 1 till you last column. then go to menu Data--Sort. Excel will automatically assume your first row of the data set as column header, if not then check the check box that says so. Select your date column in the sort by box and select asc or desc. This should sort your entire data.
0
 
gtglonerCommented:
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

0
 
ncomperAuthor Commented:
Thanks all, doing it via data-sort worked perfect

0

Featured Post

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now