Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5
Default Conditional Format of Text

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.
--
Phil Grimes
Plant Engineer
Doumak, Inc.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Conditional Format of Text

Consider using a Calculate Event macro to examine the contents of the cell
and apply the proper Custom format.
--
Gary''s Student
gsnu200703


"MM Phil" wrote:

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.
--
Phil Grimes
Plant Engineer
Doumak, Inc.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to convert a month to a quarter ...... Epinn New Users to Excel 26 May 3rd 23 07:45 PM
Conditional format in a List KC Rippstein hotmail com> Excel Discussion (Misc queries) 5 January 27th 07 01:11 PM
"Finalizing" format change to text Nancy Excel Discussion (Misc queries) 5 January 10th 07 11:33 PM
Copy & paste conditional format WCDoan New Users to Excel 2 July 27th 06 09:40 PM
Formulas dealing with text data Bagia Excel Worksheet Functions 6 June 20th 05 10:29 PM


All times are GMT +1. The time now is 02:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"