Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Sort Order with Dates & Text

Greetings,

I am trying to sort a column with dates & text in it. The problem is
the second cell. All of the cells have a date in them except for the
second cell, which has text in it. This row needs to stay in the same
position.

I am using three columns in my sort. If I could get a forth sort
criteria, I could use another column to exclude the rows that I don't
want to move.

Is there any way to do this?

If not, is there any other way to keep the second cell in column A
from moving?

Any help will be appreciated.

-Minitman
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Sort Order with Dates & Text

It seem like you have a header rows that don't need to be part of the sort.
Exclude these rows 1-3). All columns of your sort shuld have the same number
of header rows. If some of the date starts in row 2 and other start in row
3, then you have to modify worksheet by adding rows so all columns have the
same number of headers.


"Minitman" wrote:

Greetings,

I am trying to sort a column with dates & text in it. The problem is
the second cell. All of the cells have a date in them except for the
second cell, which has text in it. This row needs to stay in the same
position.

I am using three columns in my sort. If I could get a forth sort
criteria, I could use another column to exclude the rows that I don't
want to move.

Is there any way to do this?

If not, is there any other way to keep the second cell in column A
from moving?

Any help will be appreciated.

-Minitman

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27
Default Sort Order with Dates & Text

Hey Joel,

Thanks for the reply.

My apologizes for not explaining my sheet very well.

Rows 1, 2 & 3 are all header columns. Row 4 is a row filled with all
of the formulas copied down to the first new entry (the code copies
the last row to the next row and then deletes the values in the first
7 cells. Then puts the new data into those newly emptied cells).
Cell A4 has to have something in it for the code to work.

I was having trouble getting the sort to NOT sort from row 1. How can
I get the sort to start at row 5?

Here is my current code:

________________________________________________
Cells.Select
Selection.Sort Key1:=Range("A5"), _
Order1:=xlAscending, _
Key2:=Range("B5"), _
Order2:=xlAscending, _
Key3:=Range("E5"), _
Order3:=xlAscending, _
Header:=xlYes, _
OrderCustom:=1, _
MatchCase:=False, _
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal, _
DataOption2:=xlSortNormal, _
DataOption3:=xlSortNormal
Range("A65536").End(xlUp).Offset(0, 4).Select
________________________________________________
The range argument row of 5 doesn't seem to work.

Any idea's?

-Minitman



On Fri, 4 May 2007 03:43:02 -0700, Joel
wrote:

It seem like you have a header rows that don't need to be part of the sort.
Exclude these rows 1-3). All columns of your sort shuld have the same number
of header rows. If some of the date starts in row 2 and other start in row
3, then you have to modify worksheet by adding rows so all columns have the
same number of headers.


"Minitman" wrote:

Greetings,

I am trying to sort a column with dates & text in it. The problem is
the second cell. All of the cells have a date in them except for the
second cell, which has text in it. This row needs to stay in the same
position.

I am using three columns in my sort. If I could get a forth sort
criteria, I could use another column to exclude the rows that I don't
want to move.

Is there any way to do this?

If not, is there any other way to keep the second cell in column A
from moving?

Any help will be appreciated.

-Minitman


Reply
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
Can't sort cells in date order that contain dates created from arr StaceyJ Setting up and Configuration of Excel 3 February 5th 09 04:44 PM
How do you sort a list of dates into date order Tegwen Excel Discussion (Misc queries) 2 August 31st 05 02:04 PM
How do I sort dates stored as 1-Jun-05 in order of day & month stuckiniraq Excel Worksheet Functions 1 July 18th 05 08:38 AM
Can you sort text in a random order in Excel tbowden Excel Discussion (Misc queries) 3 February 1st 05 02:42 PM
Need to sort dates before 1900 in proper order sandage_2000 Excel Discussion (Misc queries) 3 January 8th 05 03:31 AM


All times are GMT +1. The time now is 05:42 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"