Solved

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

Posted on 2011-03-04
3
287 Views
Last Modified: 2012-05-11
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
Comment
Question by:ncomper
3 Comments
 
LVL 22

Accepted Solution

by:
spattewar earned 500 total points
ID: 35037325
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
 
LVL 17

Expert Comment

by:gtgloner
ID: 35037417
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
 
LVL 5

Author Comment

by:ncomper
ID: 35037436
Thanks all, doing it via data-sort worked perfect

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now