PDA

View Full Version : Sorting quetion



austenr
02-11-2010, 11:41 AM
How do you sort column A in Ascending and keep column B with it in the attached?

lucas
02-11-2010, 11:53 AM
Columns("A:B").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("D2").Select

lucas
02-11-2010, 11:54 AM
The above works in version 2003 austenr. I have no way to test it in 2007.