Forum Discussion
conditional formatting based on content of another cell
- Apr 13, 2021
Select the cells that you want to format conditionally. If more than one, the top left cell should be the active cell in the selection. Note the address of this cell.
On the Home tab of the ribbon. select Conditional Formatting > New Rule...
Select 'Use a formula to determine which cells to format'.
Enter a formula that evaluates to TRUE (or a non-zero number) if the rule should be applied, and to FALSE (or 0) otherwise.
In your example, let's say A2 is the active cell in the selection.
Use the following formula:
=B2<>""
Click Format...
Activate the Fill tab.
Specify the desired color (green in your example).
Click OK, then click OK again.
I want to set a condition to a row of cells, with 4 columns. IF one cells in the row of 4 columns has a figure above $0.01 I want the other cells that are NOT above $0.01 to be flagged.
Basically, if one of the cells in the row has a dollar figure above 1-cent and there are others that do not, the ones without should be flagged.
Let's say you want to apply this to D2:G100.
Select this range. D2 should be 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(D2<=0.01, MAX($D2:$G2)>0.01)
Click Format...
Activate the Fill tab.
Select a highlight color.
Click OK, then click OK again.