Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have numerous worksheets that I would like to sort using a variable range.
I will always sort by the last column in ascending order. I have included the following code in my Macro Range(" & AllData.Address & ").Sort Key1:=Range(" & FormulaCell.Address & "), Order1:=xlAscending, Header:= _ xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _ DataOption1:=xlSortNormal The AllData variable was defined as a range and selects all the data I would like to sort. The FormulaCell variable is set as my sort key. Any thoughts on why I would receive the following error. Run-time error '1004': Method 'Range' of object '_Global' failed |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro to sort variable data range fails | Excel Discussion (Misc queries) | |||
Macro to Sort A-Z a variable range of cells | Excel Discussion (Misc queries) | |||
VBA Variable Range Sort | Excel Discussion (Misc queries) | |||
Sort variable range in descending order | Excel Programming | |||
Set variable sort range based on found text | Excel Programming |