Append text to each cell

  • Thread starter Thread starter D-a-n_L
  • Start date Start date
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?
 
try this idea.
sub addfrontandback()
for each cel in selection
cel.value ="putthisinfront" & c & "putthisinback"
next
end sub
 
dan


="text" & cellref & "text"

Drag/copy that formula to other cells in range.

Note: the quotes " are necessary as above.

Gord Dibben Excel MVP
 
A small typo:

sub addfrontandback()
for each cel in selection
cel.value ="putthisinfront" & cel.value & "putthisinback"
next
end sub
 
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
 
Back
Top