If AND Index Match? formulas

tutv088

New Member
Joined
Feb 18, 2014
Messages
24
Hi All I am trying to figure an easy way to determine if a date that the user enters falls within a specific date range. There are 2 criteria that must be met. The final result would be an indicator or simple Yes or No.

User Enters in information in Worksheet 1. 1. Program Name 2. County 3. Date.
ABCD
ProgramCountyDateProgram Y/N
BasketballWashington06/01/18
TennisKing08/06/16
TennisDavidson04/13/18

<tbody>
</tbody>









Database of Programs and dates of when they start and End ( Separate workbook with Info)
ABCD
ProgramCountyStartEnd
BasketballWashington05/01/1812/15/18
BaseballWashington04/12/1812/14/18
BaseballDavidson06/08/1706/15/18

<tbody>
</tbody>









I would like the row in the first workbook in Column D3 to say Yes. Thank you guys and appreciate all the help and support.
 
Wow and Thank You so much you guys. The formula worked like a charm. Thank You Ras and JTAKW. Wishing you guys a wonderful day and let me know if theres anything I can ever help you with.
 
Upvote 0

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
In D2 of Sheet1 control+shift+enter and copy down:

=ISNUMBER(MATCH(1,IF(Sheet2!$A$2:$A$4=$A2,IF(Sheet2!$B$2:$B$4=$B2,IF($C2>=Sheet2!$C$2:$C$4,IF($C2<=Sheet2!$D$2:$D$4,1)))),0))+0

A score of 1 means YES, a score of 0 NO.
 
Upvote 0
In D2 of Sheet1 control+shift+enter and copy down:

=ISNUMBER(MATCH(1,IF(Sheet2!$A$2:$A$4=$A2,IF(Sheet2!$B$2:$B$4=$B2,IF($C2>=Sheet2!$C$2:$C$4,IF($C2<=Sheet2!$D$2:$D$4,1)))),0))+0

A score of 1 means YES, a score of 0 NO.

Cool thanks Aladin! So many ways to do it, you guys are so knowledgeable and Excel wizzes
 
Upvote 0
Hi JHAKW, Thank you again for your help. I was running the program with the rest of the data and noticed that it says "Yes"by default even if there was no information entered for the date. It works great by saying Yes or No for the complete data that is entered by the user but when I copy and paste the formula down to the rest of the rows it has a bunch of Yes etc... Is there anyway to blank it out but still leaving the formula in the cell or just copy the formula from the previous entry? Thanks J.
 
Upvote 0
You're quite welcome.

I actually think the formula defaults to a "No", but that's just based on the sample and not your real data, so to leave the Formula cell Blank, when no Date is in Column C of the formula sheet, we'll just add another IF test:


Book1
ABCD
1ProgramCountyDateProgram Y/N
2BasketballWashington6/1/2018Yes
3TennisKing
4TennisKing8/6/2016No
5TennisDavidson4/13/2018No
Sheet142
Cell Formulas
RangeFormula
D2=IF(C2="","",IF(SUMPRODUCT((Sheet144!A$2:A$4=A2)*(Sheet144!B$2:B$4=B2)*(Sheet144!C$2:C$4<=C2)*(Sheet144!D$2:D$4>=C2)),"Yes","No"))



Book1
ABCD
1ProgramCountyStartEnd
2BasketballWashington5/1/201812/15/2018
3BaseballWashington4/12/201812/14/2018
4BaseballDavidson6/8/20176/15/2018
Sheet144


Edit: If you mean "No Dates" entered on the "Database" sheet, let me know, we'll just need to adjust the formula a little.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,332
Members
449,077
Latest member
jmsotelo

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