MrExcel MVP, Moderator
- May 28, 2005
- Office Version
If your part numbers are in column D instead of column A, the only change required isyou last one working great but I want to switch column A to D
and I'm getting error for:
Sort Key1:=.Columns(nc), Order1:=xlAscending, Header:=xlNo
Rich (BB code):
a = Range("D2", Range("D" & Rows.Count).End(xlUp)).Value
I have not been able to reproduce the error you report. If you still get the error, please provide the full error message and what the value of nc is when you click Debug and hover over nc in the yellow line of code.
My code does not touch row 1 anyway.And can we keep row 1 pls?