LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Sorting by date


Cheers, that's done the trick (with a little tinkering).

There is one thing I can't fix, though.

The code I'm using pulls everything through from my alpha list to a ne
sheet, then sorts it by date.

Row 1 of the sheet is the headings. When the data is pulled through, i
starts in row 2, which is fine. When the date sorting code runs
however, it overwrites row 1. How can I stop that?


Simon Lloyd Wrote:
Not sure what you want but try this, where columns ("A:A") enter you
column range and so on this is simple code to sort in ascending orde
from A1 or enter your first cell you want to sort from.

Hope this helps!

Simon

Here's the code......

Sub datesort()
'
' datesort Macro


'
Columns("A:A").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
ActiveCell.Select
End Su


--
madblok
-----------------------------------------------------------------------
madbloke's Profile: http://www.excelforum.com/member.php...fo&userid=1442
View this thread: http://www.excelforum.com/showthread.php?threadid=26637

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sorting a date by month, date and then year. drosh Excel Discussion (Misc queries) 3 May 30th 08 01:57 AM
Sorting by date [email protected] Excel Discussion (Misc queries) 7 June 17th 06 01:06 PM
sorting date " MMM-YY" (Jan-05) GEORGIA Excel Discussion (Misc queries) 8 June 23rd 05 01:30 PM
Sorting by date when the date isn't exact Kim Excel Discussion (Misc queries) 1 May 5th 05 10:44 PM
Sorting by date madbloke[_14_] Excel Programming 2 October 5th 04 11:29 AM


All times are GMT +1. The time now is 12:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"