Hello,
I tested this formula in excel 2002 which worked perfectly. When I attempted to use it on excel 97, I get a "run time error 1004, method 'Range' of object '_global' failed on the highlighted line below.
I defined MyRange:
Sort macro
Cell Y1=Match(9.99999999999999E+307,H:H)-cell("Row",H6)+1
I tested this formula in excel 2002 which worked perfectly. When I attempted to use it on excel 97, I get a "run time error 1004, method 'Range' of object '_global' failed on the highlighted line below.
I defined MyRange:
Code:
=offset(sheet1!$H$6,0,0,Sheet1!$Y$1,-9)
Sort macro
Code:
Selection.Sort Key1:=Range("H6"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("myrange").Select
Selection.Sort Key1:=Range("A6"), Order1:=xlAscending, Key2:=Range("B6") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom
Cell Y1=Match(9.99999999999999E+307,H:H)-cell("Row",H6)+1