- Joined
- Jul 25, 2007
- Messages
- 26
- Reaction score
- 0
To All, Please help. I'm using the following code to find a cell in say column "B" (lets say cell "B10") with a value of zero (0) then select the cell to the left ("A10") and select all the cells to the last cell with value (lets say "A100"and at the same time select the cell "B10:B100". Then I sort by "A10" - the active cell. I can't use absolutes as each pair of columns have the zero at different rows
I can sort one column range. How do I select Two column ranges side by side.
Thanking you GeoffreyBarnard
Cells.Find(What:="0", After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
True, SearchFormat:=False).Activate
ActiveCell.Offset(0, -1).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Sort Key1:=ActiveCell, Order1:=xlDescending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
I can sort one column range. How do I select Two column ranges side by side.
Thanking you GeoffreyBarnard
Cells.Find(What:="0", After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlWhole, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
True, SearchFormat:=False).Activate
ActiveCell.Offset(0, -1).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Sort Key1:=ActiveCell, Order1:=xlDescending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal