Forum Discussion
How to write a formula to count conditions in a range and then divide the results to get a percentag
Thanks, I tried both ways and got the nesting to work because I assigned the cells filled in with black with a "1" as I have other cells in the same row that are yellow which I want to count along with the x's
=COUNTIF(C71:AF71,"X")/COUNTIF(C71:AF71,"<>"&$BE$2)
for the let function, it worked but, it wasn't calculating correctly with the BE2 cell reference, so I had to put the "1" value
=LET(xcell,COUNTIF(C71:AF71,"x"),black,COUNTIF(C71:AF71,"<>1"),xcell/black)
If I just have a fill color in a cell and want to count by that color without having to put in a value is it possible to do that?
If I just have a fill color in a cell and want to count by that color without having to put in a value is it possible to do that?
If it is possible, it's not something I know how to do. (I've looked briefly and not found a method.)
But, on top of that, I'm not sure it would be a good practice even if it were possible. It would seem to me (not knowing your full situation, of course, so willing to be corrected on this)...it would seem to me that you'd be relying on a manual process to do something that could be automated (via Conditional Formatting), and would be more reliable. That is assuming that there is some consistent set of conditions that lie behind your wanting to fill cells with this or that color, and that those conditions are to be found in one or more pieces of data elsewhere in the spreadsheet.
So why don't you start with considering the reasoning behind the color fills that you might want to consider: are they reasons/conditions that could themselves be programmed/automated?