Hello,
I use the code below to sort my data in a sheet. It kind of works but like to be able to sort it better.
If you look at the attached image I'd like all rows with empty cells to end up at the bottom of the table but can't seem to get this to work.
Does anybody have a good suggestion for doing that?2016-12-23 15_55_54-100m [reparerad] - Excel.jpg
![]()
ActiveWorkbook.Worksheets("Startlist").Sort.SortFields.Add Key:=Range( _ "L2:L25000"), SortOn:=xlSortOnValues, Order:=xlDescending, DataOption:= _ xlSortNormal ActiveWorkbook.Worksheets("Startlist").Sort.SortFields.Add Key:=Range( _ "K2:K25000"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _ xlSortNormal With ActiveWorkbook.Worksheets("Startlist").Sort .SetRange Range("C1:L25000") .Header = xlYes .MatchCase = False .Orientation = xlTopToBottom .SortMethod = xlPinYin .Apply End With
Bookmarks