nesting within AVERAGEIF

armsafna

New Member
Joined
Mar 12, 2023
Messages
9
Office Version
  1. 365
Platform
  1. Windows
I'm trying to take an average of the "Average" column depending on what the month in the "Date" column is.

DateTrial 1Trial 2Trial 3Average
1/12/2023100101102=mean(B2:D2) = 101
1/13/2023103104105=mean(B3:D3) = 103
2/12/2023106107108=mean(B4:D4) = 105

I'm trying =AVERAGEIF(Table1[Average],MONTH(Table1[Date]=1)) and it's giving me DIV/0 error.
Any ideas on how to fix it or a better approach?
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
How about
Fluff.xlsm
ABCDEFGH
1DateTrial 1Trial 2Trial 3Average
212/01/202310010110210101/01/2023102.5
313/01/2023103104105104
412/02/2023106107108107
5
View
Cell Formulas
RangeFormula
H2H2=AVERAGEIFS(E:E,A:A,">="&G2,A:A,"<"&EDATE(G2,1))
E2:E4E2=MEDIAN(B2:D2)
 
Upvote 1
Solution
How about
Fluff.xlsm
ABCDEFGH
1DateTrial 1Trial 2Trial 3Average
212/01/202310010110210101/01/2023102.5
313/01/2023103104105104
412/02/2023106107108107
5
View
Cell Formulas
RangeFormula
H2H2=AVERAGEIFS(E:E,A:A,">="&G2,A:A,"<"&EDATE(G2,1))
E2:E4E2=MEDIAN(B2:D2)
lmao you should just do my job for me. Thanks so much. If you don't mind my asking - why is "&" needed between ">=" and the date?
 
Upvote 0
It's to concatenate the date with the < or > sign.
 
Upvote 1

Forum statistics

Threads
1,223,884
Messages
6,175,173
Members
452,615
Latest member
bogeys2birdies

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