Formula to calculate total number of colored cells

barim

Board Regular
Joined
Apr 19, 2006
Messages
176
I need a formula that would calculate a total number of cells that are colored in each column. For example, in the cell C100 should be formula that would give me a count of cells that has background color green. There are no multiple colors throughout the worksheet, it is only one color - green. Total numbers should be placed from cell C100 until N100 and my data is within range of C2:N99. Is there any way to do this using formula instead of VBA? If there is no any formula solution, then I will have to use VBA solution.

Thank you in advance.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Are you using conditional formatting to color the cells? Because there is no formula that can detect a cell color. If it's conditional formatting formula applying the color, then we can work with that to get a count.
 
Upvote 0
dreid1011, thank you for your reply. I wish we have countif formula that can calculate this. To answer your question, I've got these highlighted cells through running a macro. I actually found solution by inserting one of Ozgrid's custom functions which works perfectly for this case and it is relatively fast. I wish Microsoft builds us formula instead of having involved these custom built functions.
Thanks again for your reply.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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