Creating Formulas Based On Cell Colors From Conditional Formatting

daburkesjp

New Member
Joined
Jun 13, 2008
Messages
1
Hello,

I was wondering if anyone knows how to create a formula that is dependent on the colors of a range of cells subject to conditional formatting. For example, I would like something that could answer =if(A1 is red,"Phillies",if(A1 is blue,"Mets","Marlins)). However, the text color will be generated from conditional formatting, so most of the VBA code I have found thus far isn't working properly. Does anyone know of a solution? Thanks in advance.
<!-- / message --><!-- sig -->
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
Welcome to the board...

You would probably be better off counting the conditions that created the conditional format...

for example, if the conditional format formula in column A is
=A1="Hello", therby coloring any cells in column A if it's value is "Hello"

You would use a formula to count how many cells = "Hello", not how many are colored...

=countif(A:A,"Hello")

Hope that helps..
 
Upvote 0

Forum statistics

Threads
1,190,897
Messages
5,983,447
Members
439,843
Latest member
PlanetFitness

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
Top