Hi,
I have created a macro for sorting a table by a column:
---------------------
Sub SortByModtaget()
Range("B10:O65536").Select
Selection.Sort Key1:=Range("L10"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("B10").Select
End Sub
---------------------
My problem is, that this sorts all the cells that contain data first and then places the empty cells in the bottom of the column. I need the empty cells to be in the top of the column. Any easy way to fix this?
Regards
Lars Kragh
I have created a macro for sorting a table by a column:
---------------------
Sub SortByModtaget()
Range("B10:O65536").Select
Selection.Sort Key1:=Range("L10"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("B10").Select
End Sub
---------------------
My problem is, that this sorts all the cells that contain data first and then places the empty cells in the bottom of the column. I need the empty cells to be in the top of the column. Any easy way to fix this?
Regards
Lars Kragh