Indexing or Ignore Blank rows
I am having trouble retaining blank rows in a worksheet upon sorting,
I have the sort code as follows:
Sub SortJS()
WS.Activate
Selection.Sort Key1:=Range("G2"), Order1:=xlAscending,
Key2:=Range("E2") _
, Order2:=xlAscending, Header:=xlYes, OrderCustom:=1,
MatchCase:=False _
, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal,
DataOption2:= _
xlSortNormal
End Sub
As normal any blank rows are wiped out, I can't find a good way to
prevent this from happening so I need to know if there is an "Column
Index" function in Excel similar to MS Access where an Index column is
automatically numbered and corrected for any new or deleted entries.
If this is possible I can use this column to sort all of the data and
keep it hidden.
Thanks,
Chad
|