returning multiple cells corresponding to single date range

excellerator13

New Member
Joined
Apr 1, 2013
Messages
3
Hello,

In column a of my sheet I have a start date. In colum b, I have an end date. Columns c through e contain information corresponding to the date range in column a and b. I would like to be able to enter a date on a separate sheet and do the following:

(1) determine what date ranges from columns a and b the specific date falls between.

(2) If the entered date falls between one or several of the ranges, then I would like to return on the separate sheet the entire row/rows that correspond to that date range.

Because each date will match multiple ranges, I am not sure that an if function will work. Thanks in advance!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Hi and welcome to MrExcel.

Do you mean something like this?....

Sample Data....

Excel Workbook
ABCDEF
1Start DateEnd DateData1Data2Data3
201/01/201308/01/2013Bart SimpsoncatBike
302/01/201309/01/2013Lisa SimpsondogHelicopter
403/01/201310/01/2013Grandpa SimpsonHorseBus
504/01/201311/01/2013Lisa SimpsonMousetrain
605/01/201312/01/2013Marge SimpsonfishHelicopter
706/01/201313/01/2013Maggie SimpsoncatPlane
807/01/201314/01/2013Milhouse Van HoutenPandaTut Tut
908/01/201315/01/2013Ned FlandersTigerCoach
1009/01/201316/01/2013Otto MannLionCarriage
1110/01/201317/01/2013Rod FlandersTigerBus
1211/01/201318/01/2013Tod Flanderscowtrike
1313/01/201320/01/2013Moe SzyslakdogCar
14
Sheet1


Example Results.....

Excel Workbook
ABCDE
1DateData1Data2Data3
208/01/2013Bart SimpsoncatBike
3Ned FlandersTigerCoach
4
Sheet2


The formula in B2 needs to be entered with ctrl shift enter NOT just enter, it can then be copied across and down.
You will obviously need to change the cell references and sheet name to suit your layout.

I hope that helps.
If, not, then you need to post some sample data and your expected results, you can post sample data using the link in my signature.
You can also find some very helpful formulas to "Extract" multiple records here......

Search/Lookup | Get Digital Help

And some excellent videos here....

excelisfun -- Excel How To Videos - YouTube

Ak
 
Upvote 0
Wow! Thanks so much for the quick response; this was very helpful. The date that will be entered will not always match the start or end date in sheet 1. In your example, for instance, I would like to be able to enter 5/11/2013 and have it return the data next to all of the date ranges that 5/11/2013 falls between. In your example, this would be the data for the A2:B6 ranges. Any ideas on how I can capture dates within the range? Thanks again!
 
Upvote 0
Hi,

Is this what you mean?...

Excel Workbook
ABCDEFG
1DateStart DateEnd DateData1Data2Data3
208/01/201301/01/201308/01/2013Bart SimpsoncatBike
302/01/201309/01/2013Lisa SimpsondogHelicopter
403/01/201310/01/2013Grandpa SimpsonHorseBus
504/01/201311/01/2013Lisa SimpsonMousetrain
605/01/201312/01/2013Marge SimpsonfishHelicopter
706/01/201313/01/2013Maggie SimpsoncatPlane
807/01/201314/01/2013Milhouse Van HoutenPandaTut Tut
908/01/201315/01/2013Ned FlandersTigerCoach
10
Sheet2


The formula in B2 needs entering with ctrl shift enter NOT just enter.

Take a look here....

Excel Magic Trick 894: Extract Records Between Two Dates: Filter or Formula - YouTube

I hope this helps.

Ak
 
Upvote 0
That worked, thanks! If the cell in the original sheet is hyperlinked, is there any way to maintain the hyperlink when it is copied to the second sheet? I tried hyperlinking via the =Hyperlink function, but that did not work.
 
Upvote 0
Hi,

I honestly have no ideas on this, other than try.......

=HYPERLINK(IF(ROWS(B$2:B2)<=SUMPRODUCT(--(Sheet1!$A$2:$A$13<=$A$2)*(Sheet1!$B$2:$B$13>=$A$2)),INDEX(Sheet1!A$2:A$13,SMALL(IF((Sheet1!$A$2:$A$13<=$A$2)*(Sheet1!$B$2:$B$13>=$A$2),ROW(Sheet1!A$2:A$13)),ROWS(B$2:B2))-ROW(Sheet1!$A$2)+1),""))

Formula needs to be entered with ctrl shift enter NOT just enter.

I hope that helps.

Ak
 
Upvote 0

Forum statistics

Threads
1,203,639
Messages
6,056,487
Members
444,869
Latest member
tulo spont

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