Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't sort cells in date order that contain dates created from arr | Setting up and Configuration of Excel | |||
How do you sort a list of dates into date order | Excel Discussion (Misc queries) | |||
How do I sort dates stored as 1-Jun-05 in order of day & month | Excel Worksheet Functions | |||
Can you sort text in a random order in Excel | Excel Discussion (Misc queries) | |||
Need to sort dates before 1900 in proper order | Excel Discussion (Misc queries) |