Average IF two columns (based on content of another cell)

garwil

New Member
Joined
Jul 18, 2010
Messages
28
Hi, Michael very kindly assisted me with an average calculation which worked perfectly. I have since altered the structure of the column which now contains some zeros and I am baffled as cannot find a solution to average it correctly.
My table layout is as follows....
Column "D" has dates on a daily basis extending three years down. Column "F" has percentages also extending down for each day in column "D". Cell K3 has a month. I needed to average column "F" on a per month basis and place that figure in cells K4-V4 on a per month basis.
Michael gave me this code which works fine =AVERAGE(IF($D:$D,INT(K3),$F:$F)).
Now since I have modified Column "F" and it contains Zeros the above formula returns 0%. I have tried all sorts of variations that I have found on the web such as averageif, averageifs etc and the closest I can find is this one =AVERAGE(IF($D:$D,INT(O3)),IF($F:$F>0,$F:$F)) which is returning a figure of 2852505% when it should be 70%
I hope someone can help ...
 
Hi,
What I eventually did as nothing was working properly is I created a new sheet altogether, divided the months up into three columns representing a year each and used your original formula and ranges and it works fine now... many thanks
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Forum statistics

Threads
1,214,784
Messages
6,121,535
Members
449,037
Latest member
tmmotairi

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