populated cells average

domdc1

Board Regular
Joined
Apr 10, 2006
Messages
63
Hi there all
Although ive read similar replies i cant seem to locate something specific to my question. I have a variety of cells within a1:a10, within these cells the reply is either 'Y', 'N' or 'NA'. I need to calculate the percentage of Yes compared to the total. For example if 5 cells have 'Y' and the rest have 'N' its 50% (5/10), but if 2 cells have 'NA' the total would be (5/8) as the NA cells are not calculated.

Thanks in advance
p.s. i have another issue with a scheduling problem, but ill ask that later, ill search the threads first.
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
You can use COUNTIF:
Book1
ABCD
1YStatusCount% of Total
2NYes457%
3NANo343%
4Y
5N
6NA
7Y
8N
9NA
10Y
Sheet1


HTH,
 
Last edited:
Upvote 0
Look into COUNTIF and COUNTA functions.
 
Upvote 0
may not be the best way but should work

=COUNTIF(A1:A10,"Y")/(COUNTIF(A1:A10,"Y")+COUNTIF(A1:A10,"N"))
Book1
ABCD
1Y
2N
3Y
4NA
5N
6Y
7N
8Y
9NA
10Y
11
120.625
Sheet1
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,772
Messages
6,126,814
Members
449,339
Latest member
Cap N

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