• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Counting Cells Colored by Conditional Formatting

RKK0226

New Member
I have scoured the internet and have not found anything to simply count the number of cells in a row that have bee colored by CF. I can't count the number of different codes I have tried from YouTube and Google, and ChatGPT, and ..... I thank you in advance for your consideration.

First: I am old and do not speak or write code. It's all alien to me. Second, I don't want to run a macro to complete the task - automatic update. Third: cell X8 has the fill color I want the highlighted cells to have. Fourth: I use Office 365

Below is my simple little spreadsheet. You can see the cells highlighted in Orange. These are conditionally formatted to indicate a birdie (a golf thing).

What is the code that can do this?

Thank you so much for your assistance!
 

Attachments

  • test.xlsx
    16.4 KB · Views: 6
Can you clarify at least : you 'do not want to run a macro' but you ask for a code which is since last century a macro ! So what ?​
Easy to count the conditional formatted cells according to Excel VBA forums like here​
and I'm pretty sure under Office 365 it can be directly achieved with some smart formula …​
 
I was hoping there is a way to do the count automatically. If a cell is colored, the count automatically adjusted.

I would like to accomplish this without VBA, but I had no luck with method either. I am obviously not doing it right.

Thanks
 
Thread moved to Excel forum where the great formulas helpers can see and give it a try …​
In case that is not possible under Excel then this thread will be back to VBA forum section.​
 
I deleted the 2 existing rules

i have used a conditional formatting rule of
=B12=B$2-1
and selected B12 to V43

AND that will ONLY highlight if a birdie 1 below PAR
so you can setup more rules to do 2 below par or more or even 1 or 2 over par
same formula just
=B12=B$2 -2 or
=B12=B$2+1

for 2007, 2010 , 2013 , 2016 , 2019 or 365 Subscription excel version
Conditional Formatting

Highlight applicable range >>
B12:V43 - Change, reduce or extend the rows to meet your data range of rows

Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:
=B12=B$2-1

Format [Number, Font, Border, Fill]
choose the format you would like to apply when the condition is true
OK >> OK
 

Attachments

  • test (1)-ETAF.xlsx
    16.4 KB · Views: 3
Back
Top