IF Statement in Conditional Formatting

wangaa11

New Member
Joined
Feb 28, 2020
Messages
43
Office Version
  1. 2016
Platform
  1. Windows
Hello,

In Column G I am trying to highlight the row yellow when "Apple" appears but in column F when it says sold I want the highlight to be removed. I was hoping to be able to add a conditional format to the sheet since there are several rows of data.
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Highlight all the rows you want to apply this too, then write the Conditional Formatting according to the very first row in your selection.
So, if you started on row 3, the formula would look like:
Excel Formula:
=AND($G3="Apple",$F3<>"sold")
and then choose your highlighting option.

So it would only be applied when column F is "Apple" and column G is NOT "sold".
 
Upvote 0
Highlight all the rows you want to apply this too, then write the Conditional Formatting according to the very first row in your selection.
So, if you started on row 3, the formula would look like:
Excel Formula:
=AND($G3="Apple",$F3<>"sold")
and then choose your highlighting option.

So it would only be applied when column F is "Apple" and column G is NOT "sold".
Thank you! that worked
 
Upvote 0
You are welcome!

The key is to put the $ in front of the column reference to lock it down, so it applies to all columns in the row without shifting.
 
Upvote 0

Forum statistics

Threads
1,215,067
Messages
6,122,949
Members
449,095
Latest member
nmaske

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top