Conditional Formatting with OR: statement isn't working with two conditions

draidr

New Member
Joined
Jan 11, 2011
Messages
18
I have 3 Cells I'm working with. N, O, Q

My Conditional Formatting Formula is as follows: =OR($N260+$O260<>$Q260,$O260<>$Q260)
The conditional format is in Column Q applying to cells 260-325. I want to Highlight any cell within $Q$260:$Q$325 YELLOW if any number other than $O260=$Q260 OR the sum of $N260+$O260=$Q260

If conditions are met, It's supposed to Highlight YELLOW.
(For additional reference, I have another condition for blanks to null out the above formula)

The problem I'm facing is, the formula is working fine if O=Q (IE O273=Q273) and the adjoining N cell is 0. Q273 is normal and everything is fine. If Q276 is the =SUM(N276,O276) and N276 has any number other than 0 in it, Q276 is highlighted Yellow every time.

Here is a reference table of my problem

NOQTrue = Working,
False = Not Working
Row2730750750True
Row2740750675True
(Bold = Highlight)
Row2757500750True but False
(Bold = Highlight)
Row2767507501500True but False
(Bold = Highlight)

<tbody>
</tbody>

I don't know why the conditional formula isn't working but it should. Can anyone provide assistance as to what I'm doing wrong?
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Actually, the conditional formatting is working as you typed it.

Because it is looking to meet only 1 of the 2 requirements to highlight it yellow, you will always have a highlighted cell in Q unless N is 0 or blank and O=Q.

If O=Q, no highlight, but if N <> 0 or blank also, then N+O will never equal Q..... HIGHLIGHT

If N+O=Q, no highlight, but if O<>Q.... HIGHLIGHT


Try Special-K99's formula above to see if that is what you are looking for.
 
Upvote 0
Try

=OR($N260+$O260<>$Q260,AND(COUNTIF(O260:O325)<>0,O260<>$Q260))

Ok, I see what you're talking about revcanon,
The code does in fact work... but not the way I intended. It is only looking for one of the requirements. Bahh

Special-K99's code says there are too few arguments and everything I've done thus far to edit it similar to that doesn't seem to work.

I'm still back to my original problem.
 
Upvote 0
I didn't get a response to my above question. In fact, I'm still puzzled by the whole COUNTIF looking at the cells below "O".
However, I figured out the conditional formula in a much simpler way. I was overthinking it because there were two criteria.

Solution
: Select entire Column Q.
Insert Conditional Formatting > New Rule > Use a Formula: =($N1+$O1=$Q1)=FALSE
Format > Fill Yellow.
 
Upvote 0

Forum statistics

Threads
1,214,643
Messages
6,120,702
Members
448,980
Latest member
CarlosWin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top