I want to replace the first character in a column of text

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

Guest

We have a client that has several thousand rows of data in a single column
formatted as this example shows: A12345B. Where the alpha characters are
any of the 26 available. They want to change the leading alpha character
from whatever it is presently to an upper case X while leaving the rest of
the line unaffected.

Any and all help appreciated.
 
Hi Biredndra

With the data in Col A, enter into A1, then copy down

="X"&RIGHT(A1,LEN(A1)-1)
 
or if you need a macro, just replace the range here with yours

Sub replace_text()
For Each cell In Range("a1:a30")
cell.Value = "X" & Right(cell.Value, Len(cell.Value) - 1)
Next
End Sub
 
Thank you very much Kassie...I very much appreciate the time you took to
share this solution with me...it works elegantly and is easy to employ...

Major Kudos!

Birendra
 
Thank you Gary: The macro you created works very well and is very
helpful...I am very grateful for your time and assitance...!

Thanks again...

Birendra
 
Back
Top