ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   remove leading zero from a string.. (https://www.excelbanter.com/excel-worksheet-functions/62015-remove-leading-zero-string.html)

clegge

remove leading zero from a string..
 

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

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

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


--
clegge
------------------------------------------------------------------------
clegge's Profile: http://www.excelforum.com/member.php...o&userid=29927
View this thread: http://www.excelforum.com/showthread...hreadid=496235


Peo Sjoblom

remove leading zero from a string..
 
Copy an empty cell, select the numbers and do editpaste 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)


"clegge" wrote in
message ...

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

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

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


--
clegge
------------------------------------------------------------------------
clegge's Profile:
http://www.excelforum.com/member.php...o&userid=29927
View this thread: http://www.excelforum.com/showthread...hreadid=496235



wjohnson

remove leading zero from a string..
 

If your cell is formated as "General" the leading "0" should disappear
automatically.


--
wjohnson
------------------------------------------------------------------------
wjohnson's Profile: http://www.excelforum.com/member.php...o&userid=29640
View this thread: http://www.excelforum.com/showthread...hreadid=496235


clegge

remove leading zero from a string..
 

the formula worked great... thanks!!!!!


--
clegge
------------------------------------------------------------------------
clegge's Profile: http://www.excelforum.com/member.php...o&userid=29927
View this thread: http://www.excelforum.com/showthread...hreadid=496235



All times are GMT +1. The time now is 12:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com