remove leading zero from a string..

C

clegge

just getting back into excel formulas... this is probally an eas
question....

i basically have a collumn full of account numbers that represen
numeric strings....

if the first position of the string is a zero, i would like to pull i
out... so 01147548 would become 1147548 -- thanks
 
P

Peo Sjoblom

Copy an empty cell, select the numbers and do edit>paste special and select
add, then use a format like
General and leading zeros won't show, if you need the numbers to be text you
can use a help column, assume they start in A1 in the first cell use

=IF(LEFT(TRIM(A1))="0",RIGHT(TRIM(A1),LEN(TRIM(A1))-1),A1)

copy down as long as needed then paste special as values in place, now you
can remove the original column

--
Regards,

Peo Sjoblom

(No private emails please)
 
W

wjohnson

If your cell is formated as "General" the leading "0" should disappea
automatically
 
Top