Yesterday Biff helped me sort out some counting and percentage calculation issues I was having. Thanks to Biff for the awesome solutions!
Having one more final problem, though.
I have three separate arrays of cells that I need to get a total count and percentage calculation on. The cells in each array (e.g. D21:G27, D37:G42, and E52:E58) can have one of three nominal entries made from a drop-down menu (i.e. green, yellow, or red). Those nominal entries are converted to values (i.e. 2, 1, and 0, respectively) which then need to be counted and then a percentage calculated. However, if any of the entry cells are blank, they need to be ignored rather than counted as zero entries.
Biff gave this formula that reads from a table that does all of what I described (this is for the first of the three arrays):
=IF(COUNTA(D21:G27),SUMPRODUCT(SUMIF(R1:R3,D21:G27,S1:S3))/(COUNTA(D21:G27)*2),"")
The table is:
R S
<TABLE style="WIDTH: 96pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=128><COLGROUP><COL style="WIDTH: 48pt" span=2 width=64><TBODY><TR style="HEIGHT: 18.75pt; mso-height-source: userset" height=25><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; BACKGROUND-COLOR: transparent; WIDTH: 48pt; HEIGHT: 18.75pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8" class=xl63 height=25 width=64>Green</TD><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; BACKGROUND-COLOR: transparent; WIDTH: 48pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8" width=64 align=right>2</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8" class=xl63 height=17>Yellow</TD><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; BACKGROUND-COLOR: transparent; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8" align=right>1</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8" class=xl63 height=17>Red</TD><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; BACKGROUND-COLOR: transparent; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8" align=right>0</TD></TR></TBODY></TABLE>
What I need to do is what the formula does for one array, but across all three arrays. The problem is...there are many cells between the three arrays that may have text or calculations in them. When I try to use the formula that Biff gave for one array and use the control key to select the cells from each of the three arrays to insert them in the formula, I get an error message that says "too many arguments".
For instance, this is what I tried using the control key to select the three sets of cells:
=IF(COUNTA(D21:G27,D37:G42,E52:E58),SUMPRODUCT(SUMIF(R1:R3,D21:G27,D37:G42,E52:E58,S1:S3))/(COUNTA(D21:G27,D37:G42,E52:E58)*2),"")
Basically, what I need is a formula identical to what Biff made for a single array to count and calculate across the three arrays (that are in different parts of the worksheet), ignoring empty cells.
Biff, if you are out there...I know you remember all of this stuff
Thanks folks
Having one more final problem, though.
I have three separate arrays of cells that I need to get a total count and percentage calculation on. The cells in each array (e.g. D21:G27, D37:G42, and E52:E58) can have one of three nominal entries made from a drop-down menu (i.e. green, yellow, or red). Those nominal entries are converted to values (i.e. 2, 1, and 0, respectively) which then need to be counted and then a percentage calculated. However, if any of the entry cells are blank, they need to be ignored rather than counted as zero entries.
Biff gave this formula that reads from a table that does all of what I described (this is for the first of the three arrays):
=IF(COUNTA(D21:G27),SUMPRODUCT(SUMIF(R1:R3,D21:G27,S1:S3))/(COUNTA(D21:G27)*2),"")
The table is:
R S
<TABLE style="WIDTH: 96pt; BORDER-COLLAPSE: collapse" border=0 cellSpacing=0 cellPadding=0 width=128><COLGROUP><COL style="WIDTH: 48pt" span=2 width=64><TBODY><TR style="HEIGHT: 18.75pt; mso-height-source: userset" height=25><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; BACKGROUND-COLOR: transparent; WIDTH: 48pt; HEIGHT: 18.75pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8" class=xl63 height=25 width=64>Green</TD><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; BACKGROUND-COLOR: transparent; WIDTH: 48pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8" width=64 align=right>2</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8" class=xl63 height=17>Yellow</TD><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; BACKGROUND-COLOR: transparent; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8" align=right>1</TD></TR><TR style="HEIGHT: 12.75pt; mso-height-source: userset" height=17><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; BACKGROUND-COLOR: transparent; HEIGHT: 12.75pt; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8" class=xl63 height=17>Red</TD><TD style="BORDER-BOTTOM: #ece9d8; BORDER-LEFT: #ece9d8; BACKGROUND-COLOR: transparent; BORDER-TOP: #ece9d8; BORDER-RIGHT: #ece9d8" align=right>0</TD></TR></TBODY></TABLE>
What I need to do is what the formula does for one array, but across all three arrays. The problem is...there are many cells between the three arrays that may have text or calculations in them. When I try to use the formula that Biff gave for one array and use the control key to select the cells from each of the three arrays to insert them in the formula, I get an error message that says "too many arguments".
For instance, this is what I tried using the control key to select the three sets of cells:
=IF(COUNTA(D21:G27,D37:G42,E52:E58),SUMPRODUCT(SUMIF(R1:R3,D21:G27,D37:G42,E52:E58,S1:S3))/(COUNTA(D21:G27,D37:G42,E52:E58)*2),"")
Basically, what I need is a formula identical to what Biff made for a single array to count and calculate across the three arrays (that are in different parts of the worksheet), ignoring empty cells.
Biff, if you are out there...I know you remember all of this stuff
Thanks folks