replacing cell values

  • Thread starter Thread starter Narendra
  • Start date Start date
N

Narendra

In my existing table in selected cells I want to add 1 as
1st character -- can this be done by any one command/
formula - not much conversant about excel - please
explain with example / more details
with thanks
 
This will change 1 to 11, 21 to 121, etc.

Sub addleadingone()
For Each c In Selection
c.Value = "1" & c
Next
End Sub
 
Nerendra

An alternative to Don's VB answer, would be to use a helper column, populated with 1's and concatenate the 2 numbers

So if your data is in Col B, in Col C type all 1's and in col D use this formula.....=B1&""&C1

Then copy col D.....paste special......values into col B and then you can delete cols C &

Alex
 
Back
Top