Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
snooze
 
Posts: n/a
Default remove leading zeros from text strings

I have a long list of text strings and would like to remove leading zeros,
returning each string with zeros removed. Is there an easy way to do this
using excel text functions?

ie. 00234 234
02569 2569 etc

  #2   Report Post  
bpeltzer
 
Posts: n/a
Default

If your string is in A1, then =trim(value(a1)) should get it. Value converts
it to a number and therefore drops leading 0's. Trim is my lazy way of
converting back to a string (the text function works also but requires
another argument).

"snooze" wrote:

I have a long list of text strings and would like to remove leading zeros,
returning each string with zeros removed. Is there an easy way to do this
using excel text functions?

ie. 00234 234
02569 2569 etc

  #3   Report Post  
Niek Otten
 
Posts: n/a
Default

=TEXT(VALUE(C9),"#")

Or, if they don't have to remain strings, just

=VALUE(A1)

--
Kind regards,

Niek Otten

Microsoft MVP - Excel

"snooze" wrote in message
...
I have a long list of text strings and would like to remove leading zeros,
returning each string with zeros removed. Is there an easy way to do this
using excel text functions?

ie. 00234 234
02569 2569 etc



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Leading zeros Paul Excel Discussion (Misc queries) 4 June 12th 05 04:04 AM
save text field w/ leading zeros in .csv format & not lose zeros? Ques Excel Discussion (Misc queries) 1 May 4th 05 06:21 PM
remove spaces in text in excel GnarlyCar Excel Discussion (Misc queries) 3 February 1st 05 05:02 PM
Remove single text characters mawme Excel Discussion (Misc queries) 1 January 27th 05 10:25 PM
Displaying leading zeros in an Excel spreadsheet marianthelibrarian Excel Discussion (Misc queries) 1 January 25th 05 02:08 PM


All times are GMT +1. The time now is 09:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"