How to delete fist 6 digit of all contents in a column?

C

capxc

How to delete fist 6 digit of all contents in a column?
Column has 13 digits(alpha-numeric) and we need to delete the first 6 of
each cell in the same column (D1 to D500)
 
J

Jarek Kujawa

presume E is a column of blank cells, go to E1 and insert the formula:
=Right(D1,LEN(D1)-6)
then copy down
 
F

Fred Smith

You don't. You do it as follows:

1. Insert a helper column, typically right next to the current one (so it
will be column E).
2. Insert the formula given in E1, and copy it down. The easiest way to copy
it down is double click on the fill handle (bottom right hand cornet of the
box).
3. Copy the column (highlight the top box with the E in it, right click and
choose Copy).
4. Paste Special>Values... (Right click anywhere in the column, choose Paste
Special... Chose Values).
5. Delete the old column.

Regards,
Fred.
 
P

Pete Rooney

Capxc

If you wanted a little bit of Visual basic code, you could achieve the same
result without any helper columns with the following:

Sub TrimFirstSix()
For Each TrimCell In Range("D1:D500")
TrimCell.Formula = Right(TrimCell, Len(TrimCell) - 6)
Next
End Sub

If you wanted to select a range of cells and trim THOSE, replace the second
line with: For Each TrimCell In selection

Regards

Pete
 
C

capxc

Formula is succesful but when Idelete the old column, the new column shows
only
#VALUE!
How do I get to see the numbers?
 
P

Peo Sjoblom

Before you delete the old copy all new and paste special as values in place,
then delete the old

--


Regards,


Peo Sjoblom
 

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