View Single Post
  #5   Report Post  
Harlan Grove
 
Posts: n/a
Default Need help with TRIM function

Joe Mac wrote...
Assuming that you only want to have the VALID values from your table, which
contain a numeric, and you want to strip the leading zeros from the 9 digit
number so that the following would be true - the (9) digit numeric 012012000
would end up as an (8) digit numeric of 12012000...

You can use the following formula to produce a table that you can either
filter or place into a pivot table to isolate your "VALID" entries...
=IF(ISERROR(VALUE(A4)),,VALUE(A4))
What this will do is to produce a numeric entry without leading zeroes and
produce a "0" entry from the list for those that are alpha/numeric...

....

You have stated your assumptions, but the OP's valid entries included

04874A1234 VALID

which isn't numeric. Your formula won't leave it alone, which is one of
the OP's requests.