# populated cells average

#### domdc1

##### Board Regular
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.

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
You can use COUNTIF:
Book1
ABCD
1YStatusCount% of Total
2NYes457%
3NANo343%
4Y
5N
6NA
7Y
8N
9NA
10Y
Sheet1

HTH,

Last edited:

#### iliace

##### Well-known Member
Look into COUNTIF and COUNTA functions.

#### TheNoocH

##### Well-known Member
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:

#### domdc1

##### Board Regular
EXCELLLLLLLLENT !!!!!

thanks for the help

Replies
1
Views
861
Replies
1
Views
947
Replies
17
Views
629
Replies
15
Views
755
Replies
4
Views
288

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.

### Which adblocker are you using?

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

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