PC Review


Reply
Thread Tools Rate Thread

Conditional formatting quirk

 
 
Alison KS
Guest
Posts: n/a
 
      7th Dec 2007
I am unable to fathom the errors I am experiencing with the following simple
problem. Please help with the necessary formula.

I want to make the contents of cell C4 say ‘pc’, but only when the contents
of cell B4 are anything EXCEPT ‘stock’, ‘np’, ‘ff’, or blank.

That shouldn’t be so difficult, but …

currently cell B4 has some conditional formatting which is intended to keep
the cell ‘normal’ if it’s equal to 0, or says ‘stock’ or ‘np’, turns it blue
if it says ‘ff’, but turns it red if it says anything else. This is achieved
with the following conditions in this order:

formula is =OR(B4=0,B4="stock",B4="np",C4="px in") (‘normal’ format)

cell value = “ff” (blue)

cell value not equal =”stock” (red)

and they work fine. However, during my attempts to formulate C4, B4 has been
turning red even though it’s empty. I appreciate that it’s the third
condition that’s turning it red, but why has OR(B4=0 ceased to invoke
‘normal’ formatting if there’s a formula in C4? It is OR rather than AND,
after all.

What formula do I need in C4, and how do I need to amend the conditional
formatting on B4?

Might I add that thanks to the sterling efforts of those on this group, I
have always been able to find what I need to know till now. I guess I’ve
worked my way into a logical loophole.

 
Reply With Quote
 
 
 
 
Ray
Guest
Posts: n/a
 
      7th Dec 2007
Not sure this'll help, but worth a try ...

In my experience, B4=0 and B4=empty aren't the same thing and thus
wouldn't fit under Condition #1.

Try adding [ B4="" ], without the [], to the OR formula in Condition
#1 ... I didn't test this, but I'm guessing that it'll work

br//ray
 
Reply With Quote
 
Bob Phillips
Guest
Posts: n/a
 
      7th Dec 2007
Is B4 also a formula that is returning null not 0?

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Alison KS" <(E-Mail Removed)> wrote in message
news:536D3DB2-02C7-4D95-AF11-(E-Mail Removed)...
>I am unable to fathom the errors I am experiencing with the following
>simple
> problem. Please help with the necessary formula.
>
> I want to make the contents of cell C4 say 'pc', but only when the
> contents
> of cell B4 are anything EXCEPT 'stock', 'np', 'ff', or blank.
>
> That shouldn't be so difficult, but .
>
> currently cell B4 has some conditional formatting which is intended to
> keep
> the cell 'normal' if it's equal to 0, or says 'stock' or 'np', turns it
> blue
> if it says 'ff', but turns it red if it says anything else. This is
> achieved
> with the following conditions in this order:
>
> formula is =OR(B4=0,B4="stock",B4="np",C4="px in") ('normal' format)
>
> cell value = "ff" (blue)
>
> cell value not equal ="stock" (red)
>
> and they work fine. However, during my attempts to formulate C4, B4 has
> been
> turning red even though it's empty. I appreciate that it's the third
> condition that's turning it red, but why has OR(B4=0 ceased to invoke
> 'normal' formatting if there's a formula in C4? It is OR rather than AND,
> after all.
>
> What formula do I need in C4, and how do I need to amend the conditional
> formatting on B4?
>
> Might I add that thanks to the sterling efforts of those on this group, I
> have always been able to find what I need to know till now. I guess I've
> worked my way into a logical loophole.
>



 
Reply With Quote
 
WLMPilot
Guest
Posts: n/a
 
      7th Dec 2007
Formual for C4:

=IF(OR(B4<>"stock",B4<>"np",B4<>"ff",B4<>""),"pc","")

I believe the only correction you need to make to the conditional format in
B4 is to the first condition. Add the following: B4=""
You did not account for a null or empty cell.

As for the 2nd and 3rd conditon change each to the following:
#2: Formula is: =AND(B4<>"",B4="ff") (blue)
#3: Formula is: =AND(B4<>"",B4<>"stock") (red)

I am in the habit of checking to see if the cell is blank as added protection.

Hope that works,
Les

"Alison KS" wrote:

> I am unable to fathom the errors I am experiencing with the following simple
> problem. Please help with the necessary formula.
>
> I want to make the contents of cell C4 say ‘pc’, but only when the contents
> of cell B4 are anything EXCEPT ‘stock’, ‘np’, ‘ff’, or blank.
>
> That shouldn’t be so difficult, but …
>
> currently cell B4 has some conditional formatting which is intended to keep
> the cell ‘normal’ if it’s equal to 0, or says ‘stock’ or ‘np’, turns it blue
> if it says ‘ff’, but turns it red if it says anything else. This is achieved
> with the following conditions in this order:
>
> formula is =OR(B4=0,B4="stock",B4="np",C4="px in") (‘normal’ format)
>
> cell value = “ff” (blue)
>
> cell value not equal =”stock” (red)
>
> and they work fine. However, during my attempts to formulate C4, B4 has been
> turning red even though it’s empty. I appreciate that it’s the third
> condition that’s turning it red, but why has OR(B4=0 ceased to invoke
> ‘normal’ formatting if there’s a formula in C4? It is OR rather than AND,
> after all.
>
> What formula do I need in C4, and how do I need to amend the conditional
> formatting on B4?
>
> Might I add that thanks to the sterling efforts of those on this group, I
> have always been able to find what I need to know till now. I guess I’ve
> worked my way into a logical loophole.
>

 
Reply With Quote
 
Alison KS
Guest
Posts: n/a
 
      8th Dec 2007
There's no formula in B4

"Bob Phillips" wrote:

> Is B4 also a formula that is returning null not 0?
>
> --
> ---
> HTH
>
> Bob


 
Reply With Quote
 
Alison KS
Guest
Posts: n/a
 
      8th Dec 2007
I thought that Ray, but it didn't work and I'm not sure why not.

"Ray" wrote:

> Not sure this'll help, but worth a try ...
>


 
Reply With Quote
 
Alison KS
Guest
Posts: n/a
 
      8th Dec 2007
Have tried this, but C4 returns 'pc' when B4 is blank. Not sure why. But B4
has stopped going red with the formula in C4. Progress.

"WLMPilot" wrote:

> Formual for C4:
>
> =IF(OR(B4<>"stock",B4<>"np",B4<>"ff",B4<>""),"pc","")
>
> I believe the only correction you need to make to the conditional format in
> B4 is to the first condition. Add the following: B4=""
> You did not account for a null or empty cell.
>
> As for the 2nd and 3rd conditon change each to the following:
> #2: Formula is: =AND(B4<>"",B4="ff") (blue)
> #3: Formula is: =AND(B4<>"",B4<>"stock") (red)
>
> I am in the habit of checking to see if the cell is blank as added protection.
>
> Hope that works,
> Les


 
Reply With Quote
 
Alison KS
Guest
Posts: n/a
 
      8th Dec 2007
In fact, C4 returns 'pc' when B4 says 'stock', 'np' or 'ff' as well as when
it's blank.

"WLMPilot" wrote:

> Formual for C4:
>
> =IF(OR(B4<>"stock",B4<>"np",B4<>"ff",B4<>""),"pc","")
> .....

 
Reply With Quote
 
Alison KS
Guest
Posts: n/a
 
      8th Dec 2007
So I took away the negativity and added B4=0, reversed the outcomes and that
does exactly what I want.

Thanks for everyone's valuable help.

"WLMPilot" wrote:

> Formual for C4:
>
> =IF(OR(B4<>"stock",B4<>"np",B4<>"ff",B4<>""),"pc","")
> .......

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formatting of text effecting formatting of background =?Utf-8?B?SEFI?= Microsoft Access Reports 6 25th Mar 2008 06:23 PM
Conditional Formatting No Longer Conditional in 2007 Beta =?Utf-8?B?Q2FjdHVhci1Oby1KdXRzdQ==?= Microsoft Excel Crashes 0 17th Nov 2006 10:01 PM
How do I do a complex conditional in a conditional formatting formula Ray Stevens Microsoft Excel Discussion 7 12th Mar 2006 10:24 PM
Formatting custom currency quirk jds217 Microsoft Excel Misc 2 10th Feb 2006 05:38 PM
Conditional Formatting that will display conditional data =?Utf-8?B?QnJhaW5GYXJ0?= Microsoft Excel Worksheet Functions 1 13th Sep 2005 05:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:52 PM.