Short cut way to add text

  • Thread starter Thread starter Arup C
  • Start date Start date
A

Arup C

Hi Everybody,
Is there any way to add text to another text ? The data I have like this
Jan
Feb
Mar (all in text format)
Now I want to add -07 to each of them so that they become Jan-07, Feb-07 and
Mar-07 in with very few steps (the lesser steps are better)
 
try this
Sub addtexttovalues()
For Each c In Range("a2:a22")
If Not IsNumeric(c) Then 'in case of numbers
c.NumberFormat = "@"
c.Value = c.Value & "-07"
End If
Next c
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