Hello all,
How can we count the number of cells with a specific colour.
For example, how many cells are yellow, red, green, orange etc...
In my worksheet the column with a coloured cells is column B.
Thank you!
Hello all,
How can we count the number of cells with a specific colour.
For example, how many cells are yellow, red, green, orange etc...
In my worksheet the column with a coloured cells is column B.
Thank you!
Do you have a sample? Where do you want the counts to appear?
If I have helped, Don't forget to add to my reputation (click on the star below the post)
Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
Use code tags when posting your VBA code: [code] Your code here [/code]
Hello Arlu
Here is the sample workbook. I want to count the different colours in Column B (how many yellows, red etc..)[ATTACH]219920. Lets say i want the count to appear in C2.
Thank you
TestColor.xlsx
Not working with me. Maybe I am copying wrongly...
take a new excel and try again, the file which you attached has some issues
lemme know
I tried it and after copying the function I am receiving this error message in the cell: ''#NAME?''
Arlu, any ideas?
Look at this workbook whic i tried
OK. But If I want to expand it i.e instead A1:A8 i write A1:A16, I get the same error message (#Name!)
And I referech the formula (ctrl+alt+F9) i get the same error
ahhh, seems when you close the excel, the code dissappears which result the error
so make sure, the code is in there when you modify the cells. try to edit the formula, its working that way.
am not sure why the code is lost...lemme look in to it
did you figure out?
This seems to work when I manually add the interior colors, but it didn't work for some reason on your sample.
Please Login or Register to view this content.
Hello John,
Can you try it on a simple example and post it?
Thank you very much!
I tried...I dont think it worked. Btw i there a way the number appear in a cell instead of msg box?
Hi Naja
It would be better to use conditional formatting criteria than the colour of the conditional formatting, see the attachment
Here it is:
Attachment 220210
the last attachment is not working (says it is not valid)
Plus is there a way to display the results in a cell instead of msg box.
Thank you John!!
Yes. But I need first to understand why when you test the code it doesn't work. It worked on my test.
I mean the attachment ''Attachment 220210 '' is not opening. There is an error. Maybe if you post it again.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks