Average is returning a wrong answer

frenchfry

New Member
Joined
Apr 25, 2019
Messages
1
I have a pretty complicated sheet that is calculating the average for the last 3 days, 6, 12 and 24 days. I have noticed that the answers fro 3 & 6 days are correct, but the 12 & 24 days are not correct.

[FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]=AVERAGE(OFFSET(C1,0,COUNT(C2:ZY2)-3,16,3)) is correct answer!
[/FONT][FONT=Verdana,Arial,Tahoma,Calibri,Geneva,sans-serif]=AVERAGE(OFFSET(C1,0,COUNT(C2:ZY2)-6,16,6))
is correct answer!

These are not correct
[/FONT]<strike></strike>
=AVERAGE(OFFSET(C1,0,COUNT(C2:ZY2)-12,16,12))
<strike></strike>
=AVERAGE(OFFSET(C1,0,COUNT(C2:ZY2)-24,16,24))


the formula only counts cells with numbers in them. I have checked and there are no zeros, the formatting is for numbers. I am stumped as to why this is happening. Any help would be appreciated
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Hi
Welcome to the board

...the formula only counts cells with numbers in them. I have checked and there are no zeros, the formatting is for numbers...

Excel won't care about formats when performing the calculations.

Confirm that you have only number values.

When the formula

=AVERAGE(OFFSET(C1,0,COUNT(C2:ZY2)-12,16,12))

does not work ok, use in another cell:

=COUNT(AVERAGE(OFFSET(C1,0,COUNT(C2:ZY2)-12,16,12)))

and check that it's 192.
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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