Determine if a date falls between two dates in Excel and Return a number value in another colum

cwallace70

Board Regular
Joined
Mar 7, 2011
Messages
172
I have column A with specific dates, Column B with start dates, column C with end dates, and column C with a value.
I need a formula to look at the date in column A determine where it falls between the start and end dates in columns B & C and return the number value in column C.
 

Attachments

  • Capture.JPG
    Capture.JPG
    89 KB · Views: 215

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
You can use something like (I've assumed the lookup table is actually columns B:D on another sheet, not columns B, C and C again):

Excel Formula:
=LOOKUP(1/((Sheet2!$B$2:$B$1000<=A2)*(Sheet2!$C$2:$C$1000>=A2)),Sheet2!$D$2:$D$1000)
 
Upvote 0
You can use something like (I've assumed the lookup table is actually columns B:D on another sheet, not columns B, C and C again):

Excel Formula:
=LOOKUP(1/((Sheet2!$B$2:$B$1000<=A2)*(Sheet2!$C$2:$C$1000>=A2)),Sheet2!$D$2:$D$1000)
Yes, everything is on one sheet. Correction is Column D and not C again
 
Upvote 0
I removed the @ symbol now I am getting the #SPILL! error message
=LOOKUP(1/(($T$3:$T$26>=G2)*($U$3:$U$26<=G2)),$V$3:$V$26)
 
Upvote 0
I removed the @ symbol now I am getting the #SPILL! error message
=LOOKUP(1/(($T$3:$T$26>=G2)*($U$3:$U$26<=G2)),$V$3:$V$26)
Giving different column references in the initial enquiry then what you are actually using just complicates the exercise.
The way you have your column T and U referenced assumes that
- T is the End Date and
- U is the Start Date
(this reverses the original order)
If this is correct then try this:-
Excel Formula:
=LOOKUP(2,1/(($T$3:$T$26>=G2)*($U$3:$U$26<=G2)),$V$3:$V$26)

If you have mistakenly inverted the order in changing the column references to your real column references and
- T is the Start Date and
- U is the End Date
then try this:-
Excel Formula:
=LOOKUP(2,1/(($U$3:$U$26>=G2)*($T$3:$T$26<=G2)),$V$3:$V$26)
 
Upvote 0
Apologies - I missed out the 2, part at the start of the formula!
 
Upvote 0
This formula worked?(y). Thank you. This has eliminated a manual time-consuming process. I appreciate it!

=LOOKUP(2,1/(($U$3:$U$26>=G2)*($T$3:$T$26<=G2)),$V$3:$V$26)
 
Upvote 0
Glad we could help & thank you for the feedback. I especially appreciate that you clarified which option ended up working for you.
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,197
Members
453,022
Latest member
RobertV1609

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