Conditional Format of Text

G

Guest

I would like to format a cell based upon the length of the text information
in it. I am doing a lookup of information (numbers, but as text so leading
zeros will show) of identifying codes. The code is either seven or eight
digits long. The contents of the cell have the result from the LOOKUP
function, so I can't see how to get anything from that to trigger the
formatting. The cell needing the formatting gets its information from this
formula:
=LOOKUP($A5,Prolst!$C$6:$C$360,Prolst!$A$6:$A$360)&"-"&LOOKUP($A5,Prolst!$C$6:$C$360,Prolst!$B$6:$B$360)
where $A5 is a three-digit product number.
The result now is something like: 02054300-391526, or else 0054300-00101,
and I would like to split it further as shown below.

As far as I can tell, the Conditional format instruction only works on
numeric data.

Example:
0054300 would format as 00-54300
02054300 would format as 020-54300
the second half would show as 39152-6 (adding the dash) if it is six digits
long, or does nothing if it is five digits long.
 
G

Guest

Consider using a Calculate Event macro to examine the contents of the cell
and apply the proper Custom format.
 

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