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.
Humbledj
Apr 10, 2024Copper Contributor
Is it possible to duplicate conditional formatting across a spreadsheet? I want to have the rule set up for a specific row to be duplicated for each row below it. For example, If C2="Not Available" then row 2 is formatted in Red font. If C3 is anything else then no formatting for row 3. If C4="Not Available" then row 4 is formatted in red font, etc. How do I copy the formatting rule for each row that is determined by the condition in that respective row's column C?
HansVogelaar
Apr 10, 2024MVP
You can use the Format painter, or edit the Applies to range in Conditional Formatting > Manage Rules...
- Amanda_ConnorMay 16, 2024Copper ContributorHansVogelaar
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