replacing cell values

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
 
D

Don Guillett

This will change 1 to 11, 21 to 121, etc.

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

Alex

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
 

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