Average of last three non-zero, but one i a column

RIZVI

Active Member
Joined
Jan 1, 2011
Messages
295
Office Version
  1. 2010
Platform
  1. Windows
Hi All,

I am trying to get average of last three non zero entries but one, through this formula: {=AVERAGE(IF(ROW(Q5:Q55)>=LARGE(IF(Q5:Q55,ROW(Q5:Q55)),3),IF(Q5:Q55,Q5:Q55)))}

It calculates average of all last three non zero entries. What I want it to calculate the average of say: Q44:Q46 and not take into account entry at Q47, which is the last entry. Currenly it is calculating average from Q45 to Q47.

Help is soliciated and apprecialted. Thanks in advance.

RGDS,

Rizvi
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Try this:
Excel Formula:
=AVERAGE(IF(ROW(Q5:Q55)=LARGE(IF(Q5:Q55,ROW(Q5:Q55)),{2,3,4}),IF(Q5:Q55,Q5:Q55)))
 
Upvote 1
Solution
What version of Excel are you using?

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
Try
Excel Formula:
=SUM(IF(ROW($Q$41:$Q$47)=TRANSPOSE(LARGE(IF($Q$41:$Q$47<>"",ROW($Q$41:$Q$47),""),ROW($2:$4))),$Q$41:$Q$47,""))/3
This is an ARRAY formula.
To enter ARRAY formula
Copy and paste the formula in cell
Press F2
Press Ctrl+Shift+Enter together
Excel covers the formula with {}.
 
Last edited:
Upvote 0
Dear Phuoc thanks a lot. This worked. Highly obliged.

RGDS

Rizvi.M.H.
 
Upvote 0
Dear Phuoc thanks a lot. This worked. Highly obliged.
That's good that it worked for you, but it would still help for the future (or possibly allow a simpler formula for this problem) if you addressed post #3.
 
Upvote 0
That's good that it worked for you, but it would still help for the future (or possibly allow a simpler formula for this problem) if you addressed post #3.
I have done the needful and ticked at excel 2010
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,161
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