Forum Discussion
alvarezb
Apr 13, 2021Copper Contributor
conditional formatting based on content of another cell
Hi all. I cannot figure out how to colour one cell based on the content of another. I have successfully formatted one cell to be red if its empty and orange if it is non empty. However, I don't ...
- 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.
HansVogelaar
Apr 10, 2024MVP
You can use the Format painter, or edit the Applies to range in Conditional Formatting > Manage Rules...
Amanda_Connor
May 16, 2024Copper Contributor
HansVogelaar
I did a conditional formatting formula of =$H13>DATE(2024, 4, 30) for the range A13:AG2603 to highlight all the April expenses with a May invoice date.
It works except it is also highlighting the page header each time it comes up, which is:
______________Dates_______________
Invoice Due Discount
The header is in the report 36 times corresponding with the number of pages exported into Excel from another program.
Is there any way to stop this from happening?
I did a conditional formatting formula of =$H13>DATE(2024, 4, 30) for the range A13:AG2603 to highlight all the April expenses with a May invoice date.
It works except it is also highlighting the page header each time it comes up, which is:
______________Dates_______________
Invoice Due Discount
The header is in the report 36 times corresponding with the number of pages exported into Excel from another program.
Is there any way to stop this from happening?
- HansVogelaarMay 16, 2024MVP
- Amanda_ConnorMay 16, 2024Copper Contributor