Hello,
I need to create a sort macro based upon Column Header name instead of "B2" reference as columns may be in different orders. I recorded a macro, but need to replace the Key with column headers, is that possible?
Selection.Sort Key1:="Office", Order1:=xlAscending, Key2:="Client ID" _
, Order2:=xlAscending, Key3:="Referral Rcvd", Order3:=xlAscending, Header:= _
xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:= _
xlSortNormal
Thanks in advance!
I need to create a sort macro based upon Column Header name instead of "B2" reference as columns may be in different orders. I recorded a macro, but need to replace the Key with column headers, is that possible?
Selection.Sort Key1:="Office", Order1:=xlAscending, Key2:="Client ID" _
, Order2:=xlAscending, Key3:="Referral Rcvd", Order3:=xlAscending, Header:= _
xlNo, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal, DataOption2:=xlSortNormal, DataOption3:= _
xlSortNormal
Thanks in advance!