Forum Discussion
Gregg1960
Sep 30, 2023Copper Contributor
Building a formula referencing Conditional Formatting colors
I'm trying to sum a column based on Conditional Formatting colors. In my worksheet, we use conditional formatting to change a cell's color to one of five shades of green based on its value. My partne...
- Sep 30, 2023
The Range object has a property DisplayFormat the represents the formatting as actually displayed on the screen, taking both direct formatting and conditional formatting into account.
Unfortunately, DisplayFormat cannot be used directly in a VBA function in a cell formula - it causes an error. But it's possible by using a trick - see Using DisplayFormat in a UDF
Gregg1960
Sep 30, 2023Copper Contributor
Yes, that works! Thank you very much.
Niketan
Jan 12, 2025Copper Contributor
Hi Gregg1960 ,
Can you please share excel sheet with this applied VBA example?
That'll be so helpful. Thanks in advance!!
Actually I'm trying to sum of conditionally formatted color (green & yellow) cells values.
- HansVogelaarJan 13, 2025MVP
See the attached workbook.