Look up a date in a table with a list of multiple start and dates and return a default value if found

dnwadams

New Member
Joined
Sep 29, 2015
Messages
4
Hi All,

I am having some trouble trying to create a query that will return a default value if the date being looked up falls between any of the start and end times in another table.

The date being looked up is in table1 and start and end dates are in table2. I need for the value in table 1 to be compared to each of the start and end dates in table2.

So what i would like is if [table1].[date] is between any of the list of [table2].[startdate]'s and [table2].[enddate]'s then the value "TRUE" to be shown, otherwise [table1].[value] to show.

Hopefully this makes sense, thanks in advance!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Hi Smitty,

Thanks for letting me know about this i will ensure to keep this in mind going forward.

For some reason its not allowing me to edit my post though?
 
Upvote 0

Forum statistics

Threads
1,221,841
Messages
6,162,314
Members
451,759
Latest member
damav78

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