I am trying to use conditional formatting in my merged cells. In the screenshot I merged B3:B5.
If a Cell contains the word "Apfel", I would like to format this cell and the following 3 cells (so B3 = "Apfel" ==> B3:E3 should be green).
If I try to use the conditional formatting rule [=$B3="Apfel"] an I select my desired area [Cell that contains "Apfel" ], it works. But If I merge B3 with B4 and B5, it only works for B3:E3 and not for B3:E5.
So I am trying to work with an OFFSET, but I get an Error message.
I tried [=OFFSET($C3,0,-1)="Apfel"], but it gives me a syntax error.
What am I doing wrong?
select everything from b3 to e9 and then conditional formatting new rule-
=$B3="apfel"
Try this.
Related
I would like the following result:
Number of cells (here 3) highlighted below the cell contains TRUE
Is there any solution for this?
There is no VBA needed:
Go to cell D4 and select it (otherwise the provided formula will not work).
Add a conditional formatting rule (formula) and add this as formula:
=OR(IFERROR(D1=TRUE,FALSE),IFERROR(D2=TRUE,FALSE),IFERROR(D3=TRUE,FALSE),IFERROR(D4=TRUE,FALSE))
Save the rule and copy format of D4 into your desired range. The result will be like below:
Note that WAHR means TRUE (sorry for german screenshot)
i want to write a formula in excel where it ignores the formula if the cell is not blank.
]1
In Jan '#P' column which is C11, we have numbers like 2,5,1 and some blank cells. I want to insert the below mentioned formula.
=(IF(C11=1,10%,IF(C11=2,20%,IF(C11=3,25%,IF(C11=4,30%,IF(C11=5,40%,IF(C11=6,50%,IF(C11=7,60%,IF(C11=8,70%,IF(C11=9,80%))))))))))
I want the formula to work only if the cells in column 'D11' which is %U is blank,
1) if D11 is blank, apply the formula that uses C11
2) If D11 is already present , ignore the formula.
I am also wondering if we change the color of the cell using formula. I want the cells to be highlighted in blue color while applying the above formula.
Any help please?
=if(D11="",(IF(C11=1,10%,IF(C11=2,20%,IF(C11=3,25%,IF(C11=4,30%,IF(C11=5,40%,IF(C11=6,50%,IF(C11=7,60%,IF(C11=8,70%,IF(C11=9,80%)))))))))),"")
you cant highlight cell using formula. you can use conditional formatting.
I want to highlight all the cells containing a formula error or formulas
followed the below steps
Did a CTRL+A and selected all the cells
Home > Conditional Formatting > Use a formula to determine which cells to format
Applied the formula =OR(ISERROR(A1),ISFORMULA(A1))
Selected a fill colour and clicked on ok
Expectation: All the cells which is having a formula or error value like #N/A need to be selected.
Please let me know what i am doing wrong here
Formulas in conditional formatting work with reference to the active cell in the selection. In the example given below I have selected B2 to E6 with the active cell as C3 and then applied the conditional formatting.
In the example above in the selection B1 to E6 the active cell is C3. Now when you use =ISERROR(D4), it is effectively applying it to R[-1]C[-1] because you are checking the value in D4 according to the formula and applying it on the selected cell i.e. C3 as you can see in the image.
Thus if you now put #N/A in Cell D4, Cell C3 will become Orange
If instead the active cell in the selection was D4 instead of C3 then the conditional formatting would highlight all #N/A
If you want to understand clearly, try =ISERROR($D$4) and put a #N/A in D4, that will highlight all the cells B2:E6.
Else you can also go to
File>Options>Formulas and check R1C1 reference style
I have written a formula:
=IF(len(d2)>0,IF(d2=0,true,false),IF(len(e2)>0,IF(e2=0,true,false),false))
I want to strike through entire row if the formula returns true. But it is not working. Annoying facts are:
If I place this formula into a cell, it shows correct true or false value.
If I apply this formula on entire row, only A2 and B2 cells are formatted.
To test whether there is come conflict with other formatting rules, I just removed the formula, and just wrote "true" in the custom formula column. And the entire row was formatted. I pasted formula into a cell and it was also returning true. How does the fomula which is returning true in the cell is returning false in conditional formatting?
I applied the formula to cells which have no other conditional formatting rules. The formula didn't work. So how the formula was working for A2 and B2 cells?
I tried using values other than true/false. As usually, it worked perfectly in cell, but not in conditional formatting.
It is not working even on fresh spreadsheet.
Please check it yourself. To get "True" value from the formula, enter 0 in d2 and e2 and see yourself that conditional formatting is not respecting it.
Thanks in advance for giving time to read the question.
The reason that the formula is only working for cells A2 and B2 is because D2 and E2 in the formula are relative references, which means that these cells in the formula shift as the cell which is applying the conditional formatting also shifts.
In other words, cell A2 considers this as the formula:
=IF(LEN(D2)>0,IF(D2=0,TRUE,FALSE),IF(LEN(E2)>0,IF(E2=0,TRUE,FALSE),FALSE))
And cell B2 considers this as the formula:
=IF(LEN(E2)>0,IF(E2=0,TRUE,FALSE),IF(LEN(F2)>0,IF(F2=0,TRUE,FALSE),FALSE))
Notice how the formula had the cells shift over.
The problem occurs when it gets to cell C2, which considers the formula as this:
=IF(LEN(F2)>0,IF(F2=0,TRUE,FALSE),IF(LEN(G2)>0,IF(G2=0,TRUE,FALSE),FALSE))
Presumably neither F2 nor G2 contains the data you're looking for, which is why the conditional formatting rule is not applied.
To fix this, you can change the formula to an absolute reference so that it always refers to the D and E columns, like so:
=IF(LEN($D2)>0,IF($D2=0,TRUE,FALSE),IF(LEN($E2)>0,IF($E2=0,TRUE,FALSE),FALSE))
This way, all cells in the 2nd row will consider precisely the above formula when checking the formatting (i.e. the cells will not shift).
On a side note, parts of your formula are redundant.
= IF(<condition>,TRUE,FALSE)
is equivalent to just
= <condition>
And additionally, if a third argument in an IF statement is not specified, FALSE is the default.
That being said, this formula can be simplified to:
=IF(LEN($D2)>0,$D2=0,IF(LEN($E2)>0,$E2=0))
I am trying to create a formula for Excel whereby a cell would change colour based on the text in the previous cell.
So for example if cell B2 contains the letter X and then B3 is Y, I would like B3 to turn green.
Equally, if B2 contains X and B3 contains W I would like B3 to turn red.
Any ideas much appreciated!
Select cell B3 and click the Conditional Formatting button in the ribbon and choose "New Rule".
Select "Use a formula to determine which cells to format"
Enter the formula: =IF(B2="X",IF(B3="Y", TRUE, FALSE),FALSE), and choose to fill green when this is true
Create another rule and enter the formula =IF(B2="X",IF(B3="W", TRUE, FALSE),FALSE) and choose to fill red when this is true.
More details - conditional formatting with a formula applies the format when the formula evaluates to TRUE. You can use a compound IF formula to return true or false based on the values of any cells.
Select ColumnB and as two CF formula rules apply:
Green: =AND(B1048576="X",B1="Y")
Red: =AND(B1048576="X",B1="W")
Use conditional formatting.
You can enter a condition using any cell you like and a format to apply if the formula is true.