Without using VBA: =--LEFT(RIGHT(A1,8),7)
The double negation is used to convert the resulting text to a number
And this UDF does the same
Function CropIt(mycell)
CropIt = --Left(Right(mycell.Value, 8), 7)
End Function
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email
"Fan924" wrote in message
...
For the following, I need to crop away the letters with a macro, excel
97
VWXY1234567Z
CropIt = Right(Liscence, 8)
1234567Z
How do I crop away the "Z" leaving only
1234567