Count Question

cionnaith

Board Regular
Joined
Mar 9, 2010
Messages
52
Good day folks!

I have another question about counting in cells.

I need to count across four adjacent cells (e.g. A1:A4) where each of these cells can have one of three nominal entries (i.e. green, yellow, or red). I need an entry of green to be equal to 2, an entry of yellow equal to 1 and an entry of red equal to 0. Once that is done, I need the sum of those values assigned divided my the maximum possible across the four cells...in this case 8.

Hope this makes sense...

Thanks in advance!
 
Would you mind showing how to do that last computation you gave me to these that just calculate percentages of each of the nominal types? I was messing around by trying to add what you included in that last computation to replace the /4, but am clearly doing something wrong :(

Here is what you gave me for the first one "green"

=IF(COUNTA(A1:A4),COUNTIF(A1:A4,E1)/4,"")


Thanks again. Hopefully, I will be leaving you alone after this one :P
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Would you mind showing how to do that last computation you gave me to these that just calculate percentages of each of the nominal types? I was messing around by trying to add what you included in that last computation to replace the /4, but am clearly doing something wrong :(

Here is what you gave me for the first one "green"

=IF(COUNTA(A1:A4),COUNTIF(A1:A4,E1)/4,"")


Thanks again. Hopefully, I will be leaving you alone after this one :P
If you want the percentage of non-empty cells that contain "this color"...

Maybe this...

=IF(COUNTA(A1:A4),COUNTIF(A1:A4,E1)/COUNTA(A1:A4),"")
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,853
Members
452,948
Latest member
UsmanAli786

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top