Date Range Formula Help Needed

BrettOlbrys1

Board Regular
Joined
May 1, 2018
Messages
128
Office Version
  1. 365
Platform
  1. Windows
Good morning, I am looking for some help with a formula. I want to be able to return a date value if the date itself is between a set of dates. In my spreadsheet, I have:

Lookup DateAnswerblank columnStart Date RangeEnd Date RangeValue to Return
1/1/21?1/1/211/31/211/1/21
1/2/21?2/1/212/28/212/1/21
1/3/21?3/1/213/31/213/1/21
1/4/21?4/1/214/30/214/1/21

- column A (Lookup Date) has dates that start from 1/1/21 thru 12/31/21 (above dates are just an example)
- column B (Answer) is where I want my returned value to appear
- column C is blank to keep data separate
- column D is the start of the date range for that month
- column E is the end of the date range for that month
- column F is the date value I want returned by looking up the value in column A by using the date ranges in columns E and F

The values in column A go from 1/1/21 thru 12/31/21 and my date ranges also have all 12 months too. I cannot figure out the formula to do this and any help is appreciated.

Thanks

Brett
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Why should the 2nd of Jan return a value of 1st of Feb?
 
Upvote 0
Your question and table don't seem to match each other very well. It appears that you simply want to return the date from the 'Start Date Range' that the date in column A falls into, which appears to be nothing more than the 1st day of the month in question. If that is the case then you don't need such a table to look it up, there are a number of much easier ways to do it.
 
Upvote 0
Why should the 2nd of Jan return a value of 1st of Feb?
Don't consider the data as being aligned in the rows as illustrated. Columns A & B could be on sheet 1 and the table of lookup values (columns D, E, F) could be on sheet 2, or 3, or anywhere. I just placed them like this for ease of my different data sets.
 
Upvote 0
That does not answer my question, you have shown that 1/2/21 should return 2/1/21. Why?
 
Upvote 0
Actually, I think I figured it out. I just need to do a LOOKUP formula on my table (I don't even need columns E and F), such as: =LOOKUP(A1,$D$1:$D$27,$D$1:$D$27) and then drag my formula down the column.
 
Upvote 0
Glad you've sorted it & thanks for the feedback.
However if all you start dates are the 1st of the month, as shown, you can just use
Excel Formula:
=EOMONTH(A2,-1)+1
 
Upvote 0
Solution
Glad you've sorted it & thanks for the feedback.
However if all you start dates are the 1st of the month, as shown, you can just use
Excel Formula:
=EOMONTH(A2,-1)+1
That's even better, thank you!!!
 
Upvote 0

Forum statistics

Threads
1,214,415
Messages
6,119,381
Members
448,888
Latest member
Arle8907

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