MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Modifying every item in a column

Posted by Ron on June 22, 2001 11:15 AM

I would like to add a letter to every cell in a column
The cells have data in them that must remain. I just want to add a letter to the beginning of each cell data
Thanks in advance

Posted by IML on June 22, 2001 12:26 PM

YOu can probably do this easiest with a macro someone could provide. A more manual approach would be as follows if you wanted to add an "A" in front of everything in column A.
copy this down as far as you need.
You could now copy and paste special value your new column and delete A if you like.

Good Luck

Posted by Ivan F Moala on June 23, 2001 5:32 AM

If you wanted to do it via VBA then;

Sub Add_A()
Dim DataRg As Range
Dim data As Range

Set DataRg = Range("A:A").SpecialCells(xlCellTypeConstants, 23)

For Each data In DataRg
If data <> "" Then
data = "A" & data
End If
End Sub