Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Change
Header:=xlGuess to Header:=xlYes -- Regards, Tom Ogilvy "madbloke" wrote in message ... 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 new sheet, then sorts it by date. Row 1 of the sheet is the headings. When the data is pulled through, it 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 your column range and so on this is simple code to sort in ascending order 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 Sub -- madbloke ------------------------------------------------------------------------ madbloke's Profile: http://www.excelforum.com/member.php...o&userid=14422 View this thread: http://www.excelforum.com/showthread...hreadid=266370 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Sorting a date by month, date and then year. | Excel Discussion (Misc queries) | |||
Sorting by date | Excel Discussion (Misc queries) | |||
sorting date " MMM-YY" (Jan-05) | Excel Discussion (Misc queries) | |||
Sorting by date when the date isn't exact | Excel Discussion (Misc queries) | |||
Sorting by date | Excel Programming |