remove the first letter in each cell in a column

AnnaPanna

Board Regular
Joined
May 7, 2008
Messages
56
Hi All,

I have a list with a column where all cells begins with the letter D. I would like to remove that D from all cells. For instance;

Dxxx1
Dxxx2
Dxxx3
Dxxx4

Should be;

xxx1
xxx2
xxx3
xxx4

How can I do that in a fast and easy way?

Thank you!
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Code:
With Activesheet

LastRow = .Cells(.Rows.Count, "A").End(xlUp).Row

For i = 1 To LastRow

.Cells(i, "A").Value = Right(.Cells(i, "A").Value, Len(.Cells(i, "A").Value)-1)
Next i
End With
 
Upvote 0
Your easiest method is what Shyrath said;
find an empty cell, type the following formula in it, then once its in there, then you can put the mouse cursur over the bottom right corner of that cell and drag that same formula down and it will auto-fill all the cells below it with the formula except it will reference the second, third, forth, etc cell below the one in the original formula.

=RIGHT(A1,LEN(A1)-1) <--- replace "A1" with the name of the first cell in the column.

Once you drag the formula down (drag it from the box in the lower right corner of the cell), the next cell will autofill with the formula:
=RIGHT(A2,LEN(A2)-1)

so on and so forth

It is defintely the easiest way without using VBA; plus it eliminates needing to type the formula in each box, only the first one... then drag it down to autofill
 
Last edited:
Upvote 0
Super Shy. THanks!

welcome, but it´s the same formula as what Mr Walnuts said, only his is the Visual Basic method, which means you can do it by running a macro / button. Which is, by far, actually the quickest way and doesn´t need an extra column. :)
 
Upvote 0
Hi

A simple way to remove the first letter from the cells in a column is to use Text to Columns and skip the first character.

Notice that this method does not use formulas nor vba and does not need an auxilliary column.
 
Upvote 0
If Its Always D

CTRL+H

Find What -D
Replace With -Blank
Then< Ok

Hardeep kanwar

I´m afraid that would also remove D if it´s in the middle of a word. Not just the first one.

I think pgc01 wins with the text to column one ( i didn´t know that would work! ) I tested that, and you could also use "D" as the delimiter. (if you have the room for it, as it will try and fill to the next column ofcourse).
 
Upvote 0

Forum statistics

Threads
1,214,620
Messages
6,120,559
Members
448,970
Latest member
kennimack

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top