How to count cells with one background color from a range

FvdF

New Member
Joined
Oct 19, 2020
Messages
3
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
Dear forum readers,

I have been searching for a while for a formula that counts the cells from a given range that have a background color.

I have already found many but keep getting the error "NAME" or "VALUE"
The rgb color is 150/150/150.

Can someone give me the right formula so I can get on with my project again.

I am working with a NL version of excel 2019

With Regards,
FvdF
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
It depends on how the background color was applied.

If the background color comes from Conditional Formatting, you can quite often use the exact same logic applied to Conditional Formatting in a COUNTIF or COUNTIFS formula to get what you want.

If the background color was manually applied, and doesn't really follow any pattern or logic, then you may have to use VBA (or some other clever workaround) to get what you want, as native Excel functions run off of cell values, not their formatting.

Here is a good article that shows various ways to do this: 6 Ways to Count Colored Cells in Microsoft Excel [Illustrated Guide] | How To Excel
 
Upvote 0

Forum statistics

Threads
1,223,634
Messages
6,173,477
Members
452,516
Latest member
archcalx

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