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

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
You can use COUNTIF:
Book1
ABCD
1YStatusCount% of Total
2NYes457%
3NANo343%
4Y
5N
6NA
7Y
8N
9NA
10Y
Sheet1


HTH,
 
Last edited:
Upvote 0

iliace

Well-known Member
Joined
Jan 15, 2008
Messages
3,546
Office Version
  1. 365
  2. 2016
  3. 2010
Platform
  1. Windows
Look into COUNTIF and COUNTA functions.
 
Upvote 0

TheNoocH

Well-known Member
Joined
Oct 6, 2004
Messages
3,482
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,190,916
Messages
5,983,567
Members
439,849
Latest member
Tlaw

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
Top