Edit many cells at once to add a charater to existing data?

A

ABTurner

I have a column of data and I need to add an apostrophe to the beginning of
all the cells without changing the remaining content. How can I do this? I
know how to do this for individual cells, but I would like to do it to all
cells at once.
 
J

Joel

The easiest way is to write a formula in a new column. then copy the results
from the new column back to the old column and use PastSpecial with values
selected. the formula to use in the new column would be this.

="'" & A1 This is a double quote, then an apostrophe, and then another
double quote


Copy the formula down the column.
 
G

Gary''s Student

Select the cells and run this small macro:

Sub DontQuoteMe()
Dim q As String
q = Chr(39)
For Each r In Selection
r.Value = q & q & r.Value
Next
End Sub

Note you need to add the single quote twice to get it to appear in the cell
as well as the formula bar.
 
D

David Biddulph

Helper column ="'"&A1 and copy down. The copy this column, & Edit/ Paste
Special/ Values over the original data and delete the helper column.
 
Top