Adding Text

  • Thread starter Thread starter Brent
  • Start date Start date
B

Brent

I have a whole page of different names and I need to add the same two letter
prefix to the beginning of each of them?
 
in a blank column, =prefix&first cell

so, assume the prefix is Mr

="Mr"&A2

copy down and across

Highlight your results and copy, then paste special/values
 
First change the xx in the following macro to your prefix.
Then select the cells you want to modify
Then run the macro


Sub prefixx()
For Each r In Selection
r.Value = "xx" & r.Value
Next
End Sub
 
Assume the names are in column A starting in A2, make sure column B is empty
or insert a new column B,
in B2 put


="XY"&A2

or if you want a space between


="XY"&" "&A2


replace XY with your prefix

and copy down as long as needed. Then select the help column, copy it, paste
special as values over the old
and delete the help column

--


Regards,


Peo Sjoblom
 
If the names are in column A, then you can use a formula like this in
a helper column:

="xy"&A1

and copy this down as required. Then you can fix the values in the
helper column by highlighting all the cells with the formula in,
clicking <copy>, then Edit | Paste Special | Values (check) | OK then
<Esc>. Then you can copy/paste these over the originals in column A
and then delete the helper column.

Hope this helps.

Pete
 

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

Back
Top