# Microsoft Office Application Help - Excel Help forum > Excel Charting & Pivots >  > [SOLVED] Checking whether date in range

## samparker095

I have a set of data, which has a column for week beginning & ending.

I then need to check if a bank holiday falls into these dates. The list of bank holidays is in another list.

How can I write a formula to check if these dates fall on a bank holiday.

Please see attached.

----------


## AliGW

Try this with a sample set of dates that includes one of the bank holidays you've listed:

=IF(NETWORKDAYS.INTL(A2,B2,"0000000")-NETWORKDAYS.INTL(A2,B2,"0000000",$E$2:$E$41)>0,"Yes","")

I changed Boxing Day 2019 to October just to show it working.

*AliGW on MS365 Insider (Windows) 64 bit*


A
B
C

*1*
*Week Start*
*Week Ending*


*2*
02/09/2019
08/09/2019
No

*3*
09/09/2019
15/09/2019
No

*4*
16/09/2019
22/09/2019
No

*5*
23/09/2019
29/09/2019
No

*6*
30/09/2019
06/10/2019
No

*7*
07/10/2019
13/10/2019
No

*8*
14/10/2019
20/10/2019
No

*9*
21/10/2019
27/10/2019
Yes

*10*
28/10/2019
03/11/2019
No

*11*
04/11/2019
10/11/2019
No


Sheet: *Sheet1*



*AliGW on MS365 Insider (Windows) 64 bit*


E
F

*25*
26/10/2019
Boxing Day


Sheet: *Sheet1*

----------


## samparker095

Hi, thanks for the prompt response.

I am trying to do this with tables and seem to be getting error values, could you explain why.

----------


## AliGW

Your Bank Holiday range was wrong. Try this:

=IF((([@[Week Ending]]-[@[Week Start]])+1)>NETWORKDAYS.INTL([@[Week Start]],[@[Week Ending]],"0000000",Bank_Holidays[Date]),"Yes","No")

If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

Also, if you have not already done so, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of all those who offered help.

----------


## AliGW

Thanks for the rep.  :Smilie:

----------

