see if this works for uHello Guys...
I am looking for a macro code which should remove all leading zeros from column I and convert the column format to numbers without any decimals.
Could someone please help?
Example:
SAP_CC
0376
0376
0330
0360
0503
0503
0376
0584
0584
0584
Thanks
Sanoj
Sub change_text()
[A2:A11].Value = [A2:A11].Value
End Sub
Sub change_text2()
[A9999] = 1
[A9999].Copy
Range("A2:A11").PasteSpecial Paste:=xlPasteValues, Operation:=xlMultiply
[A9999] = ""
End Sub
Hi Jayalaxmi... Thankyou but its only changing the value of I2 only.see if this works for u
Thanks Deepak its working as expectedHi,
leading zero means it's formatted as text. You can also simply do the same in xl itself.
Meanwhile try this.
Code:Sub change_text() [A2:A11].Value = [A2:A11].Value End Sub
or
Code:Sub change_text2() [A9999] = 1 [A9999].Copy Range("A2:A11").PasteSpecial Paste:=xlPasteValues, Operation:=xlMultiply [A9999] = "" End Sub
Hi Sanoj,
for non-vba, you can use the following:
Enter 1 in any separate cell
Copy
Select your range (suppose A2:A11)
Press Ctrl+Alt+V (Paste Special)
select Multiply
OK
Regards,