Averageifs with Or Condition

andybason

Board Regular
Joined
Jan 7, 2012
Messages
217
Office Version
  1. 2016
Hi,

I have put together this formula and would like to add an "or" condition:

Code:
=AVERAGEIFS(E1:E27,A1:A27,N1,G1:G27,120)

In addition to averaging these results I would like to include the values in E where the adjacent cell in F is empty and the adjacent value in G is less than 120.

Is this possible?

Thanks


Book1
ABCDEFGHIJKLMN
1AdelaideAdelaide StrikersfieldHeat won by 10 runs20651201966174.5833333Adelaide
2AdelaideSydney SixersfieldStrikers won by 48 runs1529120104
3AdelaideAdelaide StrikersfieldStrikers won by 5 wickets (with 10 balls remaining)16181201645
4AdelaideAdelaide StrikersfieldMelb Reneg won by 6 runs17191201658
5AdelaideSri LankafieldAustralia won by 41 runs1876120146
6AdelaideAdelaide StrikersbatStrikers won by 53 runs1636120110
7AdelaideAdelaide StrikersbatStrikers won by 56 runs147712091
8AdelaideMelbourne StarsbatStrikers won by 8 wickets (with 8 balls remaining)15161201522
9AdelaideAdelaide StrikersbatStrikers won by 11 runs18741201764
10AdelaideAdelaide StrikersbatStrikers won by 1 run17851201774
11AdelaideAdelaide StrikersbatStrikers won by 25 runs20221201775
12AdelaideMelbourne RenegadesfieldMelb Reneg won by 5 wickets (with 5 balls remaining)17451201765
13AdelaideAdelaide StrikersbatStrikers won by 20 runs17541201556
14AdelaideAdelaide StrikersbatSyd Sixers won by 6 wickets (with 10 balls remaining)15051201524
15AdelaideMelbourne StarsfieldStrikers won by 41 runs1785120137
16AdelaideAdelaide StrikersbatHurricanes won by 10 wickets (with 19 balls remaining)15451201580
17AdelaideBrisbane HeatfieldHeat won by 6 wickets (with 8 balls remaining)17681201804
18AdelaidePerth ScorchersbatStrikers won by 5 wickets (with 4 balls remaining)17461201755
19AdelaideSri LankafieldAustralia won by 134 runs2332120999
20AdelaidePerth ScorchersfieldStrikers won by 15 runs (D/L method)19841081837
21AdelaideSydney ThunderbatSyd Thunder won by 3 runs16851201659
22AdelaideSydney SixersfieldSyd Sixers won by 2 wickets (with 8 balls remaining)1351181378
23AdelaideAdelaide StrikersbatStrikers won by 63 runs1736120110
24AdelaideBrisbane HeatbatStrikers won by 10 wickets (with 55 balls remaining)1001021040
25AdelaideMelbourne StarsfieldStrikers won by 11 runs16241201518
26AdelaideHobart HurricanesbatHurricanes won by 10 runs21711202078
27AdelaideAdelaide StrikersfieldSyd Thunder won by 8 runs15171201439
Sheet1
Cell Formulas
RangeFormula
L1L1=AVERAGEIFS(E1:E27,A1:A27,N1,G1:G27,120)
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Not with averagifs, you need to do it the long way

=(SUMIFS(E1:E27,A1:A27,N1,G1:G27,120)+SUMIFS(E1:E27,F1:F27,"<>",G1:G27,"<120"))/(COUNTIFS(A1:A27,N1,G1:G27,120)+COUNTIFS(F1:F27,"<>",G1:G27,"<120"))
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,322
Members
452,635
Latest member
laura12345

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