Test Cell Color in conditionall formatted cell

nb4me

New Member
Joined
Dec 27, 2010
Messages
10
Is it possible to test a range of conditionally formatted cells such that:
If any cell in the range is either conditionally formatted yellow or green then End macro
Otherwise, continue executing macro.

ps:the conditional format is testing the number of spaces in each of several cells in a range. The cells must each have exactly 1 space. If the cell has no spaces, it conditionally formats to green. If it has more than 1 space, it conditionally formats to yellow. I want the macro to check the cell colors to make sure all cells have exactly 1 space before continuing. If any cell in the range doesn't have exactly one space, I want the macro to end.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
It is much easier to put the conditional formatting formula in a separate column, and then use that both for conditional formatting and anything else you need to use it for.
 
Upvote 0

Forum statistics

Threads
1,224,557
Messages
6,179,507
Members
452,917
Latest member
MrsMSalt

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