Using Average Function within an ARRAY formula

ebilbrough

Board Regular
Joined
Nov 17, 2010
Messages
61
Office Version
  1. 365
Platform
  1. Windows
I'm running Excel2010 and have the following array formula:

=AVERAGE(IF(NW100Database!$R$5:$R$173>="1/1/07"+0,
IF(NW100Database!$R$5:$R$173<"08/01/2011"+0,
NW100Database!$T$5:$T$173)))

Which works fine. I want to also create a formula that ignores any value in COL R that does not equal TODAY. I've added a line so the formula no looks like this:

=AVERAGE(IF(NW100Database!$R$5:$R$173>="1/1/07"+0,
IF(NW100Database!$R$5:$R$173<"08/01/2011"+0,
NW100Database!$R$5:$R$173<> TODAY(),
NW100Database!$T$5:$T$173)))

This results in a #DIV/0! error.

Any help resolving this is greatly appreciated. Thanks.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
I'm running Excel2010 and have the following array formula:

=AVERAGE(IF(NW100Database!$R$5:$R$173>="1/1/07"+0,
IF(NW100Database!$R$5:$R$173<"08/01/2011"+0,
NW100Database!$T$5:$T$173)))

Which works fine. I want to also create a formula that ignores any value in COL R that does not equal TODAY. I've added a line so the formula no looks like this:

=AVERAGE(IF(NW100Database!$R$5:$R$173>="1/1/07"+0,
IF(NW100Database!$R$5:$R$173<"08/01/2011"+0,
NW100Database!$R$5:$R$173<> TODAY(),
NW100Database!$T$5:$T$173)))

This results in a #DIV/0! error.

Any help resolving this is greatly appreciated. Thanks.
I'd use cells to hold the date criteria:
  • V1 = 1/1/2007
  • W1 = 8/1/2011
Then, array entered**:

=AVERAGE(IF((NW100Database!$R$5:$R$173>=V1)*(NW100Database!$R$5:$R$173 < W1)*(NW100Database!$R$5:$R$173<>TODAY()),NW100Database!$T$5:$T$173))

** array formulas need to be entered using the key
combination of CTRL,SHIFT,ENTER (not just ENTER).
Hold down both the CTRL key and the SHIFT key
then hit ENTER.
 
Upvote 0
Thank you T.Valko.

That worked although I'm still unsure as to why by adding the single line

NW100Database!$R$5:$R$173<> TODAY()

that the formula failed.
 
Upvote 0

Forum statistics

Threads
1,224,508
Messages
6,179,188
Members
452,893
Latest member
denay

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