I am trying to sort a column using VBA in Excel. This is my code,
Range("B:B").Sort _
Key1:=Range("B2"), Order1:=xlAscending
But, It sorts the header column as well. I didn't want the Header Column to be included in the sorting , So I tried the following code,
Range("B1:B").Sort _
Key1:=Range("B2"), Order1:=xlAscending
Which didn't work either. Is there anyway to tell the VBA that my first column is a header name while sorting? Kindly share your thoughts.