Array Query

Richiejjj

Board Regular
Joined
Feb 18, 2002
Messages
237
Hi

I am building a model which has a named range - bank_holidays - which lists down all of the bank holidays between now and December 2015.

I then have a series of start dates (c7:c1681) and end dates (g7:g1681)

To then work out how many bank holidays there are in each start to end date (each a year long) I tried the following array:

{=SUM(IF(Bank_Holidays>0,1,0))-SUM(IF(Bank_Holidays>G7,1,0))-SUM(IF(Bank_Holidays<C7,1,0))}

Now the problem I have is that the cell references G7 and C7 are not increasing down the rows.

Can someone help?

Rich
 
Last edited:

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.
OR, to continue with what you were doing, and mine is really exactly the same as the sumproduct formula except it is array entered. Both the sumproduct and my version are array formulas. Sumproduct just is built in and does not require the cse confirmation.

{=SUM(IF((Bank_Holidays>=C7)*(Bank_Holidays<=G7),1,0))}
 
Upvote 0

Forum statistics

Threads
1,203,760
Messages
6,057,202
Members
444,913
Latest member
ILGSE

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