ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   counting cell conditions (https://www.excelbanter.com/excel-programming/286310-counting-cell-conditions.html)

Erik[_4_]

counting cell conditions
 
I have 4 columns and I put conditions on the cells.
In these columns, we have our bowl game predictions.
After each game, I put a condition to change the
background color to yellow if that person won the pick or
grey if they lost.
At the end, I want a function to calculate how many
yellow blocks were in that column and how many grey ones
to do a winning percentage.
Please help

Gord Dibben

counting cell conditions
 
Erik

You should be able to COUNTIF based on the conditions that colored the cells.

=COUNTIF(A1:D100,"lost")/COUNTA(A1:A100) format as Percentage
=COUNTIF(A1:D100,"won")/COUNTA(A1:A100) format as Percentage

To determine the cell colorindex of CF cells requires some VBA.

Chip Pearson has details and code at........

http://www.cpearson.com/excel/CFColors.htm

Gord Dibben Excel MVP

On Sat, 27 Dec 2003 12:02:31 -0800, "Erik" wrote:

I have 4 columns and I put conditions on the cells.
In these columns, we have our bowl game predictions.
After each game, I put a condition to change the
background color to yellow if that person won the pick or
grey if they lost.
At the end, I want a function to calculate how many
yellow blocks were in that column and how many grey ones
to do a winning percentage.
Please help




All times are GMT +1. The time now is 09:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com