PDA

View Full Version : Solved: Add MS- and delete the 3 of first number



parscon
02-15-2012, 02:56 PM
I need a VBA code that add MS- to first of cell and delete the 3 first of numbers like :
12345678 = MS-45678
87452168 = MS-52168
1234567 = MS-4567
123456 = MS-456
12345 = MS-45
Please help me .

Bob Phillips
02-15-2012, 04:50 PM
For Each cell In Range("A1:A5")

cell.Value="MS-" & Right$(cell.Value, Len(Cell.Value) - 3)
Next cell

parscon
02-16-2012, 06:55 AM
Thank you very much for your help .