Hello experts
I am facing a very weird problem. I have this code which is running fine and giving the correct result. I just want to add a level to sort the data in the code. The weird part is that the old code is working fine but after adding another level to sort it is wiping out the whole data. I need your expertise to help me to help me find and correct the issue.
Code
Range("A2:" & LastColumn & Range("A" & Rows.Count).End(xlUp).Row).Sort _
Key1:=Range(DestinationRemarksColumn & "2"), Order1:=xlAscending, Header:=xlNo ' Sort Remarks Column lowest to highest
This code has one level to sort and is working correct.
Code
Range("A2:" & LastColumn & Range("A" & Rows.Count).End(xlUp).Row).Sort _
Key1:=Range("C2"), Order1:=xlAscending, _
Key2:=Range(DestinationRemarksColumn & "2"), Order1:=xlAscending, Header:=xlNo
After replacing the above lines with the below lines the code is wiping the data.
Weird as it sounds but this is the issue I am facing.