Excel Conditional Formatting Nest AND and OR - excel

I have a rather quick hopefully not too complicated question for you guys. I'm trying to use conditional formatting where I want a cell to turn red if the following statements are False or If the conditions are not met.
I'm using the Formula for Conditional formatting where you have to input it manually. The real problem I'm having is using a nested AND and OR.
Here's the formula I have for conditional formatting (one thing to note that, maybe I could be wrong, but my 2013 Excel is treating OR as an AND and vice versa. I've tested it many times and this is the case, so the formula you see below treats OR and AND as I mentioned. In short, pretend that AND is OR and OR is AND. But if it confuses you, just go with the correct convention:
=AND(OR(SUM(A1:A5)=0,SUM(B2:B5)=0),OR(SUM(C1:C5)=0,SUM(D1:D5)=0),SUM(E1:E5)=0)
So basically, say I have cell 'A7'. I want 'A7' to be red until there's a number in
Both A1:A5 and B2:B5 or:
E1:E5 or;
Both C1:C5 and D1:D5 -----> here's where it doesn't work.
Points 1 and 2 above work as desired, but when I add the second 'OR' it doesn't work. Remember, for some reason my Excel COnditional Formatting treats OR like and AND and vice versa so when I say:
OR(SUM(A1:A5)=0,SUM(B1:B5)=0)
It treats it like an AND where both conditions must be true, therefore, I've been following this convention.
So basically how do I have more that one OR statements within AND as shown above.
I hope I made the question clear. Appreciate your guys help!! If you can also tell me a general rule on how nested And OR works, that would be helpful.
Thank you!

Select A7, fill it with red colour (standard fill), clear any existing CF from it and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=OR(COUNT(E1:E5),AND(COUNT(A1:A5),COUNT(B2:B5)),AND(COUNT(C1:C5),COUNT(D1:D5)))
Format..., select No Colour fill, OK, OK.

Try this =IF(OR(AND((SUM(A1:A5)>0),(SUM(B2:B5)>0)),SUM(E1:E5)>0,AND((SUM(C1:C5)>0),(SUM(D2:D5)>0)))=FALSE,TRUE,FALSE)
I put this into a cell first and used the Evaluate Formula before pasting it into the Conditional rule.
Set the text to be red if this is true.

Related

How to Format / Highlight cells that do not contain any number

For our address label printer we use an Excel file.
Unfortunately in Holland many people forget to add their house number and I'm trying to fill them with red so our team knows they need to contact them to get their house number.
Here is an example:
https://gyazo.com/89a0f89542b2256efdda45c7dec00ce4
As you see in cell D9. somebody forgot to enter a house number, so that cell should be filled red.
I googled a lot, but could not find the correct conditional formatting answer for it.
As mentioned by Solar Mike, this is fairly easy indeed, you just need to create a conditional formatting rule, based on the =ISBLANK() function, as shown here:
(The G3 in the formula refers to the top left cell.)
To find if string contains any number you can use this formula:
=COUNT(FIND({0,1,2,3,4,5,6,7,8,9},D1))>0
It returns TRUE if there is a number and FALSE otherwise.
Since you can't use arrays in conditional formatting you have to use this formula in "helper column", then you can use output (TRUE and FALSE) in conditional formatting.

Is changing the color of a cell based on nested conditionals possible?

I have been trying to change the color of certain cells on my WS that fall outside of an acceptable range. The statement I've been trying to use is,
IF(OR('cell'>1.3,'cell'<2.5),'turn red','do nothing')
In english, "If a cell is less than 1.3 or greater than 2.5 turn red, else do nothing." I cannot find a resource that guides me to how I can get the cells to change colors. I also have been unsuccessful in creating a statement in the Conditional Formatting tab that satisfies my goal. I feel this should be simple, but for some reason cannot figure it out. Does anyone know if this is possible, and if so how to do it?
EDIT: Also, I have different ranges based on another cell on the spreadsheet. I need this also taken into consideration
Select the columns that you want to format
Click Conditional format --> new rule
Select "Use a formula to determine which cells to format"
In the formula bar enter the formula =AND(A1>1.3,A1<2.5)
Choose the fill color as red and press OK
am confused with your formula and your english version. If its the other way, then use the formula =OR(A1<1.3,A1>2.5)

Excel conditional formating - conditional on sum of all previous cells and total sum

I have a question with regards to conditional formatting which I simply can't seem to solve.
The aim is to format the background color for the left-most cells that are blank up until a cell contains a value - and after this there should be no more formatting in this row. You can see an image of the result I'm hoping for beneath:
So far I've managed to create the conditional formatting of the blank rows, but sadly haven't managed to create the "single-cell" formatting (in yellow) conditional of the sum of all the first cells being = 0.
I've created a formula which actually succeeds in calculating the sum of the previous cells, but this formula includes INDIRECT() which it seems that conditional formatting doesn't allow. At least I'm getting an error starting with the follow (translating the error from Danish to English might not be intuitive):
You cannot use reference operators such as.....
The formula I'm trying is the following:
=AND(SUM(A2:INDIRECT(IF(COLUMN(A2)>=27;CHAR((64-26)+COLUMN(A2))&CHAR((64-26)+COLUMN(A2))&ROW(A2);CHAR((64)+COLUMN(A2))&ROW(A2))))>0;$K2>0)
Where $K2 is the sum of the row.
Is there a way to SUM a range of cells by doing something similar to this:
=SUM(B2:CHAR((64)+COLUMN())&ROW();"")) to dynamically SUM the range from B2 to the current cell? The problem in this case is whether the part CHAR((64)+COLUMN())&ROW();"") can be converted into a legible cell such as B4 to make it work inside the =SUM() formula?
Sadly the =ADDRESS() formula cannot be used (as far as I know) as this will trigger the same error in conditional formatting as well.
For now I would like this to work with the regular Excel conditional formatting, but if anyone have a simple VBA this would also have interest - however, I would by far prefer the regular solution.
The question:
Is there a way to create a formula that doesn't trigger this error - maybe by refrasing the formula or doing something completely else?
It seems to me that this could be handled with a much simpler CFR formula like,
=and(not(sum($a2:a2)), $k2)
Am I missing something?

How to apply conditional formatting based on the result of a cell's formula

I am stumped at what should be a simple matter. I have this formula in a column of cells:
=IF(ISBLANK(BG7),"",IF(BG7>=70,"OverBought",IF(BG7<=30,"Oversold","Neutral")))
The formula works and the cell shows the correct word.
I would like to apply conditional formatting to the result of the formula
green for Oversold
red for OverBought
yellow for Neutral
I have tried every variation I can think of for "Value of Cell" with and without quotes, "Enter a Formula" etc and no dice. What am I missing?
I used your formula, selected the cells, and used the menu "Conditional Format", then first option (something like "highlight cells"), then forth option ("equal"), then typed Oversold with no quotes and anything else, then selected a format option.
Then i repeated the same steps for the other values (Neutral, OverBought), selecting different format options.
It worked.
This set of rules work for me:
Go to Conditional Formatting > New Rule > Format only cells that contain > Cell value Equal to Whatever.
Admittedly I use Excel 2013, not 2010 as in your case, but I'd be very surprised if there is much difference for conditional formatting rules like these.

Conditional Formatting for a cell containing a particular equation

I tried using steps identified here but realized that it refers to cells that have any formula in them. I would like to format based on one particular formula.
Is it possible to use conditional formatting to refer to a cell that only has a particular equation, for example an "IF" statement in the cell?
You don't mention what the formula is but do mention an IF statement so suggest (though clearly not Conditional Formatting in the conventional sense), HOME, Editing - Find & Select, Find what:
=*IF(*
Find All, Ctrl+A, and formatting of your choice.

Resources