Append text to each cell

D

D-a-n_L

Is there a way to append text to the beginning of and end of a group of
cells that have different text entries in them. I want to paste a standard
statement at the beginning of each cell without modifying the existing text.
I also want to do the same at the end of each cell?
 
D

Don Guillett

try this idea.
sub addfrontandback()
for each cel in selection
cel.value ="putthisinfront" & c & "putthisinback"
next
end sub
 
G

Gord Dibben

dan


="text" & cellref & "text"

Drag/copy that formula to other cells in range.

Note: the quotes " are necessary as above.

Gord Dibben Excel MVP
 
D

Dave Peterson

A small typo:

sub addfrontandback()
for each cel in selection
cel.value ="putthisinfront" & cel.value & "putthisinback"
next
end sub
 
D

D-a-n_L

Works like a champ, domo arigato

Dave Peterson said:
A small typo:

sub addfrontandback()
for each cel in selection
cel.value ="putthisinfront" & cel.value & "putthisinback"
next
end sub
 

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