I’m trying to pull the last 6 numbers out a chassis number by using =RIGHT(D2,6) and then a macro copies the resulting cell value and "Paste Special"s the value into another cell.
The macro is:
Range("H2:H58").Select ' COPIES LAST 6 TO CELL A2 DOWN Application.CutCopyMode = False Selection.Copy ActiveWindow.SmallScroll Down:=-6 Range("A2").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False
The only problem is, that it does not paste it as a number, but as text. This stops a VLOOKUP from identifying the data as a number when comparing it to a list of car VINs I need to find. Even selecting the cells manually and formatting them does not convert the pasted data to numbers. Any ideas how to overcome this please?