Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default conditional formating with len

hello,

i have a question with conditional formating. please help.

a
00607
01505
132
12345

i wanted that if cell box contained less than 5 characters, it is fill with
red.
above is all digits stores in text. i made it text since some values have 0
in front.

i went to conditional formating and did
cell value is, not equal to, ="LEN(5)"
then fill box with red
i also tried ="LENB(10)" but that didn't work.

could you please help?

thank you




  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 208
Default conditional formating with len

You need to use a conditional stmt in the conditional format...

try putting this in the conditional format box...
=if(len(a1)=5,0,1)

this will return true if A1 does not = 5, since it's true it will
trigger your conditional format.




On Feb 7, 1:22 pm, doyree wrote:
hello,

i have a question with conditional formating. please help.

a
00607
01505
132
12345

i wanted that if cell box contained less than 5 characters, it is fill with
red.
above is all digits stores in text. i made it text since some values have 0
in front.

i went to conditional formating and did
cell value is, not equal to, ="LEN(5)"
then fill box with red
i also tried ="LENB(10)" but that didn't work.

could you please help?

thank you


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 208
Default conditional formating with len

Correction...

my post should say...

this will return true if THE LENGTH OF A1 does
not = 5, since it's true it will


On Feb 7, 1:34 pm, Tim879 wrote:
You need to use a conditional stmt in the conditional format...

try putting this in the conditional format box...
=if(len(a1)=5,0,1)

this will return true if A1 does not = 5, since it's true it will
trigger your conditional format.

On Feb 7, 1:22 pm, doyree wrote:

hello,


i have a question with conditional formating. please help.


a
00607
01505
132
12345


i wanted that if cell box contained less than 5 characters, it is fill with
red.
above is all digits stores in text. i made it text since some values have 0
in front.


i went to conditional formating and did
cell value is, not equal to, ="LEN(5)"
then fill box with red
i also tried ="LENB(10)" but that didn't work.


could you please help?


thank you


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default conditional formating with len

Select the cells to format and do the following:

Click FORMAT in the menu and select CONDITIONAL FORMATTING

Change CELL IS in condition 1 to FORMULA IS

In the formula field enter the following as a formula (No quotes),
substituting A1 in the formula with the starting cell in your selection range:
=LEN(A1)<5

Click the FORMAT button and click the PATTERNS tab, click the color flavor
of your choosing and click the OK command button to exit formatting and then
click the OK command button to exit conditional formatting.


--
Kevin Backmann


"doyree" wrote:

hello,

i have a question with conditional formating. please help.

a
00607
01505
132
12345

i wanted that if cell box contained less than 5 characters, it is fill with
red.
above is all digits stores in text. i made it text since some values have 0
in front.

i went to conditional formating and did
cell value is, not equal to, ="LEN(5)"
then fill box with red
i also tried ="LENB(10)" but that didn't work.

could you please help?

thank you




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default conditional formating with len

You were very close. Try this. Select the cells you want to format then
Format|Conditional Format|Formula is

Paste this in
=LEN(A1)<5
Choose a colour and click OK
Note you must change A1 to the topmost selected cell.

Mike

"doyree" wrote:

hello,

i have a question with conditional formating. please help.

a
00607
01505
132
12345

i wanted that if cell box contained less than 5 characters, it is fill with
red.
above is all digits stores in text. i made it text since some values have 0
in front.

i went to conditional formating and did
cell value is, not equal to, ="LEN(5)"
then fill box with red
i also tried ="LENB(10)" but that didn't work.

could you please help?

thank you






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default conditional formating with len

CFFormula is =LEN($A1)<5 Format to red


Gord Dibben MS Excel MVP

On Thu, 7 Feb 2008 10:22:05 -0800, doyree
wrote:

hello,

i have a question with conditional formating. please help.

a
00607
01505
132
12345

i wanted that if cell box contained less than 5 characters, it is fill with
red.
above is all digits stores in text. i made it text since some values have 0
in front.

i went to conditional formating and did
cell value is, not equal to, ="LEN(5)"
then fill box with red
i also tried ="LENB(10)" but that didn't work.

could you please help?

thank you




  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default conditional formating with len

You might want to exclude empty cells (if there are any):

Assume the range in question is A1:A5
Select the range A1:A5
Formula Is: =AND(A1<"",LEN(A1)<5)

--
Biff
Microsoft Excel MVP


"doyree" wrote in message
...
hello,

i have a question with conditional formating. please help.

a
00607
01505
132
12345

i wanted that if cell box contained less than 5 characters, it is fill
with
red.
above is all digits stores in text. i made it text since some values have
0
in front.

i went to conditional formating and did
cell value is, not equal to, ="LEN(5)"
then fill box with red
i also tried ="LENB(10)" but that didn't work.

could you please help?

thank you






  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 24
Default conditional formating with len

tried all formulas
yours did the magic!!

thanks!!!!!

"Gord Dibben" wrote:

CFFormula is =LEN($A1)<5 Format to red


Gord Dibben MS Excel MVP

On Thu, 7 Feb 2008 10:22:05 -0800, doyree
wrote:

hello,

i have a question with conditional formating. please help.

a
00607
01505
132
12345

i wanted that if cell box contained less than 5 characters, it is fill with
red.
above is all digits stores in text. i made it text since some values have 0
in front.

i went to conditional formating and did
cell value is, not equal to, ="LEN(5)"
then fill box with red
i also tried ="LENB(10)" but that didn't work.

could you please help?

thank you





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
Conditional formating nitsa Excel Discussion (Misc queries) 4 April 13th 09 10:56 PM
Conditional Formating jk9533 Excel Discussion (Misc queries) 2 October 15th 07 06:49 PM
Conditional Formating Trying To Excel Excel Worksheet Functions 4 December 9th 05 08:04 AM
Conditional Formating Trying To Excel Excel Worksheet Functions 3 December 9th 05 06:20 AM
Install dates formating using conditional formating? Jerry Eggleston Excel Discussion (Misc queries) 2 November 9th 05 05:49 PM


All times are GMT +1. The time now is 08:29 PM.

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"