Append & prepend string to existing rows

Biker John picture Biker John · Apr 24, 2014 · Viewed 26.3k times · Source

I have a table of numbers:

1
2
3
4
5
6
7
.
.
.

What i would like to get:

*1*
*2*
*3*
*4*
*5*
*6*
*7*
.
.
.

I have written a formula, but i dont know how to apply this function to the existing table. I keep getting some kind of reference error. (REF!)

My formula:

= "*" & A2:A(whatever number is last) & "*"

Answer

xQbert picture xQbert · Apr 24, 2014

Assuming this is a one time thing...

  1. Insert a column next to the one you want to change
  2. write the formula as ="*"&B1&"*" where b1 is the 1st cell containing the number to add * to.
  3. go to the end of the column with the numbers, arrow over to the next cell (empty column with the formula.)
  4. press ctrl shift up arrow highlighting all the cells in that column from the last number to top.
  5. press ctrl d to fill down
  6. now highlight the column with the correct values (#) and select copy.
  7. right click on the original column letter.
  8. select paste special
  9. select values click ok
  10. delete the column you originally added.