Detect fill colour in cells

davej311

New Member
Joined
Nov 17, 2012
Messages
37
I have a conditional formatting that shades cells based on my criteria, however if the cell already as shading I want to leave it as is. How can I do this please?

Thanks
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
How is it "already have shading"
If manual shading then you have to use VBA to detect the colour of the cell, you would not be able to do this via Condtional Formatting.
If you're saying the cell is shaded by an existing Condtional Formatting then just use the same condition to detect if the cell is already shaded in your new CF formula.
 
Upvote 0
I'm not an expert on VBA and certainly haven't delved into the "detecting colours" side of VBA :(
 
Upvote 0
One option.
In Name manager create a name, I've used IsColoured, & in the refers to box put =GET.CELL(63,INDIRECT("rc",FALSE))
Then in you Conditional formatting formula you can use something like
=AND(A1<>"",IsColoured=0)

The workbook will need to be saved as Macro enabled.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,271
Members
452,628
Latest member
dd2

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