How do I shorten a 17 digit field to a 6 digit field?

G

Guest

I am using Microsoft Exce 2002. I am trying to shorten a few hundred 17
digit alphanumeric fields to just the last 6 digits of the 17 digit fields.
Any ideas would be helpful.
 
G

Guest

One approach can be with the worksheet formula RIGHT. If you have you data
in column A, something like this in column B will do what you want:
=RIGHT(A1,6)

Hope this helps,
Miguel.
 
D

Don Guillett

Sub shorten()
For i = 1 To Cells(Rows.Count, "e").End(xlUp).Row
Cells(i, "e").Value = Right(Cells(i, "e"), 6)
Next i
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top