add characters to each cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

hi all,

is there a formula to add characters to all fields in a column?

like add Croco at the beginning of each cell all along the column...

Thank you in advance
 
One way is to insert a helper column, add the text you want.

Say your data is column A.

Insert a new column B:
In B1, put this formula
="Croco" & A1
Then drag that formula down column B as far as you need.
I might use:
=if(a1="","","Croco") & A1

Then select column B
edit|Copy
Select A1
Edit|Paste special|Values
Delete column B
 
hi,
formulas return values, they cannot perform actions like add characters to a
cell or group of cells. this might require a macro.
but you can use a formula as a work around.
example:
in a1 you have abc and want to add def
in b1 put the formula... =A1 & "def"
Cell B1 will then display abcdef
you can copy B1 and pastespecial values in A1 then delete B1
now A1 reads abcdef - no formula.
If you have a column of data, you can copy the formula down, then copy
column B and Pastespecial Values in column A then delete column B

regards
FSt1
 
hi again,
if you just have to....
Sub addstuff()
Dim r As Range
Dim r2 As Range
Dim t As Range
Set r = Range("A2")
Set t = Range("G2") 'put what your want to add here (croco?)
Do While Not IsEmpty(r)
Set r2 = r.Offset(1, 0)
r = t & r
Set r = r2
Loop
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

Back
Top