Ignoring Blank cells while calculating average.

Nikita005

New Member
Joined
May 11, 2016
Messages
2
Hi,

I am trying to get average using following :

=COUNTIF(D3:D60,"Pass")-COUNTBLANK(D3:D60)/ROWS(D3:D60)

But I am getting 3989.66%.
Can you please help me correct the formula?

Thanks
Nikita
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Welcome to the Board!

You are missing parentheses, so it divides the 2nd term by the 3rd term first, and then subtracts it from the first.
I think this is what you want:
Code:
[COLOR=#333333]=(COUNTIF(D3:D60,"Pass")-COUNTBLANK(D3:D60))/ROWS(D3:D60)[/COLOR]
 
Last edited:
Upvote 0
If the cells are really blank/empty, AVERAGE() should ignore them anyway?
My initial thought, but upon further inspection of their formula, it looks like the range has text, and they are trying to count/average the number of cells containing certain text (i.e. "PASS").
 
Upvote 0

Forum statistics

Threads
1,214,830
Messages
6,121,835
Members
449,051
Latest member
excelquestion515

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