char code for custom format

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
 
R

Ron Rosenfeld

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top