char code for custom format

  • Thread starter Thread starter Biff
  • Start date Start date
B

Biff

Hi Folks,

I am using a custom number format of 000. In some cases
this will produce a leading zero which is what I want.
However, that leading zero is not recognized in this
formula: A1 could contain a value like 021.

=CODE(LEFT(A1,1))

or more simply, in the LEFT, MID, or Right functions.

I have to define this leading zero somehow for a
conditional format. I do have an alternate method but it's
highly undesirable. Splitting the number into individual
cells and thereby not needing the custom format.

Any ideas?

Biff
 
Hi Folks,

I am using a custom number format of 000. In some cases
this will produce a leading zero which is what I want.
However, that leading zero is not recognized in this
formula: A1 could contain a value like 021.

=CODE(LEFT(A1,1))

or more simply, in the LEFT, MID, or Right functions.

I have to define this leading zero somehow for a
conditional format. I do have an alternate method but it's
highly undesirable. Splitting the number into individual
cells and thereby not needing the custom format.

Any ideas?

Biff

=CODE(LEFT(TEXT(A1,"000"),1))


--ron
 
Back
Top