IF statement dependent on cell fill color

jardenp

Active Member
Joined
May 12, 2009
Messages
373
Office Version
  1. 2019
  2. 2016
  3. 2013
  4. 2011
  5. 2010
Platform
  1. Windows
I would like to have a formula in, say, cell A2 that determined if cell A1 had a fill of either of two standard colors (the ones labeled "standard colors when you drop down the fill menu) and then returned a value--orange=1 and blue=2. If the cell isn't filled with one of the two colors, I want the result to be "" (blank). Is there a way to do this?

Something like =IF([fill of A1]=[orange], 1, IF([fill of A1]=[blue],2,""))

For a couple reasons, I can't use VBA/Macro for this. I know it can be done that way but I'm looking for a worksheet-formula-only solution.

Thank you!

JP in IN
 
Last edited:
Is it possible to do something like this?

=IF([fill of A1]=[Green], IF ([fill of B1]=[Green],2,""))

Looking to get a yes if all 4 cells are green
 
Upvote 0

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Upvote 0

Forum statistics

Threads
1,221,418
Messages
6,159,791
Members
451,589
Latest member
Harold14

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