Forum Discussion
Having trouble counting cells by fill color.
I have been trying to find an easier way to calculate the number of cells from column B through column F by color rather than needing to do it manually for each sheet. For example, I want the H4 cell to automatically calculate the number of dark blue cells in column B through column F.
I have tried VBE codes to color count, which worked for dark blue, but then I try the same for other colors and it won't work. For example, the light blue should be 12, but the formula says 7 when I use it.
I would also be happy with calculating based on data range (ex: light blue is greater or equal to 80 but less than 90). And the colors for column B through column F are automatic based on the number I input. Apologies if I'm not explaining this well enough. Thank you in advance.
=COUNTIF($B$1:$B$152,">=90")
=COUNTIFS($B$1:$B$152,">=80",$B$1:$B$152,"<90")
etc. Modify the ranges as needed.
2 Replies
=COUNTIF($B$1:$B$152,">=90")
=COUNTIFS($B$1:$B$152,">=80",$B$1:$B$152,"<90")
etc. Modify the ranges as needed.
- dylanchappineCopper ContributorThe second one is working after changing the second set of Bs to Fs so it calculates for all the columns (I might not have explained that well enough). Thank you very much for the solution!