How to average large formulas ignoring 0

nsmjc1

New Member
Joined
Feb 15, 2014
Messages
17
So in Cell K12 there is a rather large formula (I condensed it for this example).

This formula is to average out the respective cells in column J. For each cell there is a possibility of 9 different entries. NRT, N/O, 1,2,3,4,5,6,7

So based on the formula in K12 I need Cell J12 to Display the answer.

if any one of the Cells referenced in the formula are NRT then I need it to Display NRT. Which the Formula does now.

The problem comes in when a Cell is N/O (Not Observed)

How do I get the formula to Ignore N/O currently I have it set up to recognize N/O as 0. But excel averages 0 in and it affects the answer.

I know in a simple formula I can add <>0 to the formula to ignore zeros. what I cannot figure out is how to write it into a bigger formula such as in K12.

For example the current numbers in Cells J17:J25 should average 5 however the formula averages it as 1 because it calculates N/O as 0.

I could not attach a sample problem however here is a link to it.

https://onedrive.live.com/redir?res...75&authkey=!AOJMGJwmsV2ipL8&ithint=file,.xlsx
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Hi, welcome to the board.

Perhaps something like this

Code:
=IF(COUNTIF(J1:J100,"NRT")>0,"NRT",SUMIF(J1:J100,"<>N/O")/(COUNTA(J1:J100)-COUNTIF(J1:J100,"N/O")))
 
Upvote 0

Forum statistics

Threads
1,215,133
Messages
6,123,235
Members
449,092
Latest member
SCleaveland

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