SOLVED

conditional formatting based on content of another cell

%3CLINGO-SUB%20id%3D%22lingo-sub-2270253%22%20slang%3D%22en-US%22%3Econditional%20formatting%20based%20on%20content%20of%20another%20cell%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2270253%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20all.%20I%20cannot%20figure%20out%20how%20to%20colour%20one%20cell%20based%20on%20the%20content%20of%20another.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20successfully%20formatted%20one%20cell%20to%20be%20red%20if%20its%20empty%20and%20orange%20if%20it%20is%20non%20empty.%20However%2C%20I%20don't%20know%20how%20to%20then%20change%20it%20green%20if%20the%20cell%20next%20to%20it%20is%20non-empty.%20Specifically%2C%20column%20A%20has%20an%20action%20due%20date%20(red%20if%20not%20date%20entered%2C%20orange%20if%20a%20date%20is%20entered).%20Column%20B%20is%20the%20actual%20completion%20date.%20So%20if%20Column%20B%20has%20a%20date%20in%20it%2C%20I%20wish%20Column%20A%20to%20turn%20green.%20Any%20ideas%3F%20Thank%20you!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2270253%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

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 know how to then change it green if the cell next to it is non-empty. Specifically, column A has an action due date (red if not date entered, orange if a date is entered). Column B is the actual completion date. So if Column B has a date in it, I wish Column A to turn green. Any ideas? Thank you!

2 Replies
best response confirmed by alvarezb (New Contributor)
Solution

@alvarezb 

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.

@Hans Vogelaar 

 

Awesome! That works perfectly! Thank you Hans Vogelaar! Hope you are keeping well and safe.