Forum Discussion
captainFlow
Oct 20, 2022Copper Contributor
conditional formatting doesn't work with complex "IF" statement
=IF(INDIRECT(ADRESS(ROW();COLUMN()))>1;1;0) It doen't work, when I put it in the formula for conditional formatting, but for example when I try to separate it and use "INDIRECT(ADRESS(ROW();COLUMN()...
HansVogelaar
Oct 20, 2022MVP
What do you want to do? Highlight the active cell?
- captainFlowOct 20, 2022Copper ContributorYes, I want to highlight all cells for which condition will be true.
- HansVogelaarOct 20, 2022MVP
If you want to highlight cells whose value is is a number greater than 1:
- Select the range that you want to format.
- In the following, I will assume that A2 is the top left cell of the selection, and that A2 is the active cell in the selection.
-
On the Home tab of the ribbon, click Conditional Formatting > New Rule...
-
Select 'Use a formula to determine which cells to format'.
-
Enter the formula
=AND(ISNUMBER(A2),A2>1)
- Click Format...
- Activate the Fill tab.
- Select a highlight color.
- Click OK, then click OK again.
- captainFlowOct 20, 2022Copper ContributorThanks, but my formula is much more complex that I attached here and when I was dubugging it I found that IF with nested expressions doesn't work for me, so I need to deal with complex exressions using IF.