How to count cells based on color and Yes/No entries in Excel

Josh Perkey 0 Reputation points
2024-01-06T20:40:37.4366667+00:00

I'm looking for a way to count cells based on their background color and adjacent cells that contain "Yes" or "No" in Excel. Specifically, I want to count cells that have a certain background color and an adjacent cell contains "Yes". Is there a way to assign a value to a certain cell color to make this possible? I'm open to using macros if needed.

Microsoft 365 and Office | Development | Other
Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Vahid Ghafarpour 23,385 Reputation points Volunteer Moderator
    2024-01-07T00:50:55.0633333+00:00

    Thanks for posting your question in the Microsoft Q&A forum.

    Here is an example VBA function that counts the number of cells with a specific colour:

    https://trumpexcel.com/count-colored-cells-in-excel/

    ** Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful **

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.