Average Function

vmjan02

Well-known Member
Joined
Aug 15, 2012
Messages
1,134
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
I have this table and not sure as why the average is taking the 0 value cell as it should not take any cell having 0 value for average calcu, any idea.


Cell Formulas
RangeFormula
B3:E15B3=AVERAGE(IF(J3 > 0, J3), IF(O3 > 0, O3), IF(T3 > 0, T3), IF(Y3 > 0, Y3), IF(AD3 > 0, AD3), IF(AI3 > 0, AI3), IF(AN3 > 0, AN3))
F3:F15F3=C3/SUM(B3:E3)
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
the Average function does not take into account empty cell values, but if you feed it with 0s it will calculate them too.
However, in the data you presented i cannot see the actual problem.
 
Upvote 0
the Average function does not take into account empty cell values, but if you feed it with 0s it will calculate them too.
However, in the data you presented i cannot see the actual problem.
I am using this formula and it is working perfect.
Thank you for your advice, it help me a lot.

Excel Formula:
=SUM((J3>0)*J3, (O3>0)*O3, (T3>0)*T3, (Y3>0)*Y3, (AD3>0)*AD3, (AI3>0)*AI3, (AN3>0)*AN3) / SUM((J3>0), (O3>0), (T3>0), (Y3>0), (AD3>0), (AI3>0), (AN3>0))
 
Upvote 0
IF(J3 > 0, J3)
if these are values in cells rather than parts of a tedious formula you will get the expected average. And your formulas will be easier to construct and read
 
Upvote 0
Are there headings in columns J:AR? If so, can you post J1:AR15 with XL2BB? There may be a simpler formula.
 
Upvote 0
Are there headings in columns J:AR? If so, can you post J1:AR15 with XL2BB? There may be a simpler formula.
here you go


NAF Week - 32 - 2024.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXYZAAABACADAEAFAGAHAIAJAKALAMANAOAPAQ
111-Aug-2412-Aug-2413-Aug-2414-Aug-2415-Aug-2416-Aug-2417-Aug-24
2DataDEGRADEDGOODINTERRUPTEDREDUCED_ROBUSTNESSPercentageDEGRADEDGOODINTERRUPTEDREDUCED_ROBUSTNESSDEGRADEDGOODINTERRUPTEDREDUCED_ROBUSTNESSDEGRADEDGOODINTERRUPTEDREDUCED_ROBUSTNESSDEGRADEDGOODINTERRUPTEDREDUCED_ROBUSTNESSDEGRADEDGOODINTERRUPTEDREDUCED_ROBUSTNESSDEGRADEDGOODINTERRUPTEDREDUCED_ROBUSTNESSDEGRADEDGOODINTERRUPTEDREDUCED_ROBUSTNESS
31288362471134480585.3%19936212114847685543622887247731633674780847762753625011284807342357111458490900001923633313904794
4242491058106580.8%47491743107036496031106839492731108947489862107043491137106300004248471411027
5313501496529962262185.7%1391147918106423140131914924191022790135414966096422561131914990996422267130215045310072231300001415150728106422657
6412314155103190486.9%1191411911519101191415695189412614158941892127141859118951251413710419040000122141761191928
7535589510978586.4%3758848479328588912377236587412378935591198789435909957760000285903128793
8613414134442264181.5%1141416238926261031422931826651131427134826421531396458526191661392557526760000157142504342615
97217513701447623786.7%1545106115886301232513111353624717951466133562623125128915656139266513741392620400001565171614486269
10896520089257372596486.0%9112000995776260261121200167564025825100620062759332603310112010815795259588712006255765260170000869202751551425923
1191029213120136885.3%1088863290142310292258513571019268851364939298801351108926599134600001019359821365
12103574895898987.4%34756343101232716256962225623688443882005210354281866210160000398197661064
131119125686187358786.6%1822566118335711782569917335771872567619135821872566319636072012565219635970000211257631823586
1412330225067326164659882.7%3170253389236648054325025552929634901133952409492746445293190249060231345240309424282222474503600003713262289305947717
151317830389862322987.7%76303017783273963039879632819630314105031542493037988032132383044176632390000312305009013215
NAF Week - 32 - 2024
Cell Formulas
RangeFormula
A5:A15A5=A4+1
 
Upvote 0

Forum statistics

Threads
1,224,811
Messages
6,181,081
Members
453,021
Latest member
Justyna P

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