Returning the unique label whether a date falls within a list of date ranges that have all been uniquely labeled.

drmurph

New Member
Joined
Oct 11, 2023
Messages
3
Platform
  1. Windows
Hoping someone can help me with this problem I have been having.
I am trying to check whether a date falls within a list of date ranges, and if so, the formula would return the value that has been assigned to the specific date range that the entered date falls within.
In my file, on tab 1 a table has been created labeled, Table2, and has the following data. As you can see, each date range has been assigned a unique #.

Table2;
Period Start Date (Column 1)Period End Date (column 2)Assigned Period # (Column 3)
3/9/2020​
9/10/20201
9/11/2020​
9/10/20212
9/11/2021​
9/30/20213
12/8/2022​
12/7/20234


On the second tab I have the table where one of the columns is a list of the dates I want to check and a column for the Assigned Period # that that date falls within.
Table5;
Entered Date (Column E)Assigned Period # (Column I)
3/13/2020 0:00​
3/17/2020 0:00​
3/17/2020 0:00​
3/17/2020 0:00​
3/23/2020 0:00​
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
if it matters to anyone what the solution was, here ya go
=IFERROR(INDEX(Table2[ASSIGNED PERIOD #],MATCH(1, ([@ENTERED DATE]>=Table2[Period Start Date])*([@ENTERED DATE]<=Table2[Period End Date]),0)),"DATE not within any Period")
 
Upvote 0
Solution

Forum statistics

Threads
1,223,885
Messages
6,175,179
Members
452,615
Latest member
bogeys2birdies

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