AVERAGEIFS formula

redspanna

Well-known Member
Joined
Jul 27, 2005
Messages
1,602
Office Version
  1. 365
Platform
  1. Windows
Hi all

I have this formula that will give me the average all times in the LOG sheet for those held through column G if the Month value is the same as that in cell T11

=AVERAGEIFS(Log!G:G,Log!A:A,">="&T11,Log!A:A,"<="&EOMONTH(T11,0))

How can this formula be changed so that the average is actually taken from a more than one column in the LOG sheet, for example G:AE?

If I simply change my formula to =AVERAGEIFS(Log!G:AE,Log!A:A,">="&T11,Log!A:A,"<="&EOMONTH(T11,0)) I get a #VALUE error

thanks in advance
 

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
All your ranges need to be the same size and shape for AVERAGEIFS so you'll need an array formula something like:

Excel Formula:
=AVERAGE(IF(Log!A1:A1000>=T11,IF(Log!A1:A1000<=EOMONTH(T11,0),Log!G1:AE1000,""),""))

array-entered with Ctrl+Shift+Enter. Note: do not use entire columns with array formulas.
 
Upvote 0
All your ranges need to be the same size and shape for AVERAGEIFS so you'll need an array formula something like:

Excel Formula:
=AVERAGE(IF(Log!A1:A1000>=T11,IF(Log!A1:A1000<=EOMONTH(T11,0),Log!G1:AE1000,""),""))

array-entered with Ctrl+Shift+Enter. Note: do not use entire columns with array formulas.
Thanks for suggestion, but the result I'm getting doesn't seem correct. If I highlight all the cells myself and look at the bottom right corner of the sheet, Excel gives me an average of 6:23 whilst the formula gives a result of 1:32 for example
 
Upvote 0
Are there blank cells in your data range? If so, you'll need:

=AVERAGE(IF(Log!A1:A1000>=T11,IF(Log!A1:A1000<=EOMONTH(T11,0),IF(Log!G1:AE1000<>"",Log!G1:AE1000,""),""),""))
 
Upvote 0
Are there blank cells in your data range? If so, you'll need:

=AVERAGE(IF(Log!A1:A1000>=T11,IF(Log!A1:A1000<=EOMONTH(T11,0),IF(Log!G1:AE1000<>"",Log!G1:AE1000,""),""),""))

Perfect - thanks so much :)
 
Upvote 0

Forum statistics

Threads
1,214,954
Messages
6,122,462
Members
449,085
Latest member
ExcelError

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