AVERAGEIF with division

zafega

New Member
Joined
Apr 10, 2019
Messages
8
Good morning,

I am using average if =AVERAGEIF(AT177:AY177,"<>0"), to get the average of a series of data (similar to the one in the fist raw I have pasted here)
I am using if because I need to exclude the "0" from the calculation.
The complicated things for me now is that I need to divide each data by a number contained in a cell (shown here as 4), before getting the average (in this example is 2928)



012,0000011,4200
4
2928

<colgroup><col><col><col span="2"><col><col></colgroup><tbody>
</tbody>




Any help is very much appreciate it.

Best regards,

Federico
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
you want to divide the result by 4
or each data element by 4
2928 is the average / 4
so its NOT each / 4
its the average / 4


can you just expand - so the average
is 12,000 + 11,420 = 23,420
two items so to get average = 23,420 / 2 = 11, 710
then / 4
= 2928

is that the arithmetic you want to carry out ?]

guessing your layout

=AVERAGEIF(AT177:AY177,"<>0") / AT179
assuming that cell AT179 has the number 4 in
 
Upvote 0
Thanks @etaf for the reply.
Indeed the result you see there is manually calculated and not done with the expression I am searching for here.
The result you see (2928) is each cell / 4, and then averaged.
What I am searching for here is an expression where I can carry all this calculation in just one cell, taking into consideration that I have to take out all the 0s.
Thanks for trying to helping me out
 
Upvote 0
this may not be the best way to do this - and others may have a better answer
But I'm thinking of using sumproduct to divide each entry by 4
so you get
=SUMPRODUCT((AT177:AY177)/AT179) . - again assuming AT179 is the cell with the 4 in
Now you can divide by the count of none zero entries to get average
=COUNTIF(AT177:AY177," < > "&0)

putting all together
=SUMPRODUCT((AT177:AY177)/AT179) / COUNTIF(AT177:AY177," < > "&0)

I have added spaces to any < or > as this forum converts to html and you dont see all the formula
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,252
Members
449,075
Latest member
staticfluids

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