Keep getting an error on line 6. I cant seem to solve the concatenation
I'm trying to get the last column variable into the range.
'remove dashes from part numbers on DSV base data sheet
'first get the last column
LCDSV = WS3.Cells(1, Columns.Count).End(xlToLeft).Column
'then remove dashes
WS3.Range("A1:" & LCDSV & "1").Replace What:="-", Replacement:="", SearchOrder:=xlByColumns, MatchCase:=True
This is part of a much larger procedure that works fine, and even this part works OK if I hard code the column address into it, but the last column may change in the future.
Naturally, any help is most appreciated