Averageifs return #DIV/0! based on multiple criteria from a single range

ammykhan

Board Regular
Joined
Apr 23, 2022
Messages
54
Office Version
  1. 2021
Platform
  1. Windows
Hi, there
Trying to apply AVERAGEIFS to my Shipping_Mode column, the formula appears to be like =Averageifs(Total,Ship_Mode,"Regular Air",Ship_Mode,"Express Air") but always returns a #DIV/0!. Had a lot of deliberation on it but of no avail. Waiting for some hindsight from senior excel gurus, pls help me in this regards, thanks ?
 

Attachments

  • image_2022-04-23_094120429.png
    image_2022-04-23_094120429.png
    228.6 KB · Views: 7

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
try
Code:
=average(Averageif(Ship_Mode,"Regular Air",Total),Averageif(Ship_Mode,"Express Air",Total))
 
Upvote 0
try
Code:
=average(Averageif(Ship_Mode,"Regular Air",Total),Averageif(Ship_Mode,"Express Air",Total))
Thanks for suggestion and prompt response, apparently the formula worked but when I reduced the size of data to see whether it is working or not, due to some unknown reason the result doesn't match with the expected value which makes me believe whether we are applying it correctly or not, can you review it to see whether any rectification is required to remove the unexpected error
 

Attachments

  • image_2022-04-23_103243259.png
    image_2022-04-23_103243259.png
    175.6 KB · Views: 6
Upvote 0
Welcome to the MrExcel board!

when I reduced the size of data to see whether it is working or not, due to some unknown reason the result doesn't match with the expected value
Yes, averaging averages will almost certainly always give incorrect results.

Try this instead
Excel Formula:
=AVERAGE(FILTER(X4:X1042,(M4:M1042="Regular Air")+(M4:M1042="Express Air")))

BTW, for the future BTW, I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with. :)
 
Upvote 0
Solution
Thanks :)Peter_SSs, it worked now, though i hear about this excel add_in but since I joined just now, I have to say sorry for the inconvenience that may be caused to you due to my naivety on the forum.
 
Upvote 0
Thanks :)Peter_SSs, it worked now,
You're welcome. Glad to help. Thanks for letting us know. (y)


though i hear about this excel add_in but since I joined just now, I have to say sorry for the inconvenience that may be caused to you due to my naivety on the forum.
Yes, we understand that you are new here and it takes a while to find out how things work. Still if you can make it as easy as possible for helpers, you tend to get faster help most times.
You can try out XL2BB in the Test Here forum so that if/when you have another question, you will be ready to go with it. :)
 
Upvote 0

Forum statistics

Threads
1,215,043
Messages
6,122,812
Members
449,095
Latest member
m_smith_solihull

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