remove leading zeros from text strings

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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).
 
=TEXT(VALUE(C9),"#")

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

=VALUE(A1)

--
Kind regards,

Niek Otten

Microsoft MVP - Excel
 
Back
Top