Average based on discrepancies.

Allo

New Member
Joined
Feb 25, 2009
Messages
5
Hi All!.

I'm trying to figure out formula to calculate average for 3 columns, if difference in between all 3 numbers is less than 10% (max is base), then I need average of all 3 numbers, if discrepancy is more than 10%, I need average of closest 2 numbers. Please help!
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi All!.

I'm trying to figure out formula to calculate average for 3 columns, if difference in between all 3 numbers is less than 10% (max is base), then I need average of all 3 numbers, if discrepancy is more than 10%, I need average of closest 2 numbers. Please help!

I "think" I understand what you are asking...

Can you provide some examples for the 3 numbers and what output you expect to get?

Will the numbers always be increasing/decreasing?

Do get the difference, do you want to subtract the smaller numbers from the max?
 
Upvote 0
Hi
Welcome to the board

Assuming the numbers in A1:A3, try:

=IF(MIN(A1:A3)/MAX(A1:A3)>=90%,AVERAGE(A1:A3),AVERAGE(MEDIAN(A1:A3),IF(MEDIAN(A1:A3)<AVERAGE(A1:A3),MIN(A1:A3),MAX(A1:A3))))<?XML:NAMESPACE PREFIX = AVERAGE(A1 /><AVERAGE(A1:A3),MIN(A1:A3),MAX(A1:A3))))< p></AVERAGE(A1:A3),MIN(A1:A3),MAX(A1:A3))))<>
 
Upvote 0
Thank you. But I think I'm missing something (end of the formula):confused:.

Can you explain? Please give an example of 3 numbers for which the expected result is different from the the formula result.
 
Upvote 0
Now it works! Somehow I managed to miss part of the formula. Thank you very much.
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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