Vlookup? Index Match?

kattyg261

New Member
Joined
Aug 9, 2024
Messages
4
Office Version
  1. 365
Platform
  1. Windows
I have a register with a list of names with arrival and departure dates.

I would like to create a report on another worksheet that I enter a start and end date and it draws out all the the entries from that timeframe.

I have no idea where to begin and what formula I need to be using - lookups, index match etc or something else.

Help please.
 

Attachments

  • VR image 1.png
    VR image 1.png
    14.8 KB · Views: 4
  • VR image 2.png
    VR image 2.png
    7.4 KB · Views: 4

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
Welcome to the MrExcel board!

It is not clear whether the entries need to
  • exactly match the Start Date and End Date, or
  • lie entirely within those two dates, or
  • just at least partially overlap those dates.
Could you give a slightly larger set of sample data and the expected results and explain again in relation to that sample data, clarifying the above points.

Also, we cannot copy from a picture to test sample data so you would get more helpers trying if you gave us that sample data with XL2BB so that we can copy for testing. :)

(If you have trouble with XL2BB review the "XL2BB Icons greyed out" link in the 'Known XL2BB issues' section near the top of theXL2BB Instructions page linked above.)
 
Upvote 0
Unfortunately I cant upload the sample data. I've attached another two examples.

One worksheet contains a list of people who have different arrivals dates.

I want to create a report that I enter a start and end date and all people who are arriving on the start date, in between and the end date will populate. I intend to run that report at the beginning of eah week. I want all of the information from the master list to populate.

I hope this explains better.
 

Attachments

  • VR sample 1.png
    VR sample 1.png
    58.2 KB · Views: 9
  • VR sample 2.png
    VR sample 2.png
    17 KB · Views: 9
Upvote 0
maybe this?

Book4
ABCDEFGHIJKLM
1Visitor IDVisitor FnameVisitor LnameArrival DateDeparture DateFinderStart Date7/9/2024
2140248AliceMiller7/8/20248/1/20241End Date8/2/2024
3120114ChrisHanson7/11/20248/17/20241
4124696MarkKrygs7/23/20249/7/20241Visitor IDVisitor FnameVisitor LnameArrival DateDeparture Date
5412950John Brigg8/11/202410/5/20240140248AliceMiller7/8/20248/1/2024
6728223KyleWatson9/4/202410/5/20240120114ChrisHanson7/11/20248/17/2024
7120479JennSimmon9/15/202410/28/20240124696MarkKrygs7/23/20249/7/2024
8138920RobinSmith9/26/202411/20/20240
9101740AndrewWillis10/9/202412/13/20240
10129270SteveTrevor10/18/20241/8/20250
11972522SusanLittle10/23/20241/11/20250
12139753SussieJackson11/18/20241/16/20250
13388035MaryChan11/20/20241/16/20250
14247685JoulesCheng11/27/20241/30/20250
Sheet1
Cell Formulas
RangeFormula
I5:M7I5=FILTER($A$2:$E$14,F2:F14=1)
F2:F14F2=IF(OR(IF(AND(D2>=MIN($J$1:$J$2),D2<=MAX($J$1:$J$2)),1,0)=1,IF(AND(E2>=MIN($J$1:$J$2),E2<=MAX($J$1:$J$2)),1,0)=1),1,0)
Dynamic array formulas.
 
Upvote 0
Solution
Thank you.

So I can get the finder and filter to work on the same worksheet but when I try to put the filter on a different worksheet it wont work. See example.
 

Attachments

  • VR sample 3.png
    VR sample 3.png
    31.3 KB · Views: 5
Upvote 0
The 'include' array has to have dimensions compatible with the filter array. You’re include array goes to row 2000 but your filter array only goes to row 1571. Make it either A2:E2000, or N2:N1571.
 
Upvote 0
All good.
Just checking as perhaps I have misunderstood the requirement. I have altered the data in row 14 below, but shouldn't the person from row 14 in this case be included in the final list since they are in attendance during the period of interest? If they should be included then could the alternative formula in cell I12 work for you? Note that this formula does not require the 'Finder' column.

kattyg261.xlsm
ABCDEFGHIJKLM
1Visitor IDVisitor FnameVisitor LnameArrival DateDeparture DateFinderStart Date9/07/2024
2140248AliceMiller8/07/20241/08/20241End Date2/08/2024
3120114ChrisHanson11/07/202417/08/20241
4124696MarkKrygs23/07/20247/09/20241Visitor IDVisitor FnameVisitor LnameArrival DateDeparture Date
5412950John Brigg11/08/20245/10/20240140248AliceMiller8/07/20241/08/2024
6728223KyleWatson4/09/20245/10/20240120114ChrisHanson11/07/202417/08/2024
7120479JennSimmon15/09/202428/10/20240124696MarkKrygs23/07/20247/09/2024
8138920RobinSmith26/09/202420/11/20240
9101740AndrewWillis9/10/202413/12/20240
10129270SteveTrevor18/10/20248/01/20250
11972522SusanLittle23/10/202411/01/20250Visitor IDVisitor FnameVisitor LnameArrival DateDeparture Date
12139753SussieJackson18/11/202416/01/20250140248AliceMiller8/07/20241/08/2024
13388035MaryChan20/11/202416/01/20250120114ChrisHanson11/07/202417/08/2024
14247685JoulesCheng1/07/20245/08/20240124696MarkKrygs23/07/20247/09/2024
15247685JoulesCheng1/07/20245/08/2024
16
Sheet3
Cell Formulas
RangeFormula
I5:M7I5=FILTER($A$2:$E$14,F2:F14=1)
I12:M15I12=FILTER(A2:E14,(D2:D14<=J2)*(E2:E14>=J1))
F2:F14F2=IF(OR(IF(AND(D2>=MIN($J$1:$J$2),D2<=MAX($J$1:$J$2)),1,0)=1,IF(AND(E2>=MIN($J$1:$J$2),E2<=MAX($J$1:$J$2)),1,0)=1),1,0)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,221,526
Messages
6,160,340
Members
451,637
Latest member
hvp2262

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