Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have five different areas on a worksheet that I want to sort separately.
When it gets to the fourth section ("A43:f" & DMcnt), I get the following error message: "RunTime Error 1004 This operation requires the merged cells to be identically sized." Not sure what I am doing wrong, any suggestions? I use the following code for each group like this: With Worksheets("CASB-Toronto Central Phone List").Range("a12:f" & AMcnt) .Sort _ Key1:=.Columns(6), _ Order1:=xlAscending, _ Header:=xlNo, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal End With With Worksheets("CASB-Toronto Central Phone List").Range("a21:f" & BMcnt) .Sort _ Key1:=.Columns(6), _ Order1:=xlAscending, _ Header:=xlNo, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal End With With Worksheets("CASB-Toronto Central Phone List").Range("a33:f" & CMcnt) .Sort _ Key1:=.Columns(6), _ Order1:=xlAscending, _ Header:=xlNo, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal End With With Worksheets("CASB-Toronto Central Phone List").Range("a43:f" & DMcnt) .Sort _ Key1:=.Columns(6), _ Order1:=xlAscending, _ Header:=xlNo, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal End With With Worksheets("CASB-Toronto Central Phone List").Range("a50:f" & EMcnt) .Sort _ Key1:=.Columns(6), _ Order1:=xlAscending, _ Header:=xlNo End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Help! I am having a problem with sort! | Excel Discussion (Misc queries) | |||
Sort Problem | Excel Discussion (Misc queries) | |||
A "sort" problem | Excel Discussion (Misc queries) | |||
Sort Problem | Excel Worksheet Functions | |||
Sort Problem | Excel Discussion (Misc queries) |