Populate Data Based on Start and End Date

kumara_faith

Well-known Member
Joined
Aug 19, 2006
Messages
922
Office Version
  1. 365
Hi

I have the following table:

Book1
CDEFGHIJ
2Table 1Table 2Table 3
3DatePriceStart Date7/6/2012DatePrice
42/11/20101.405625End Date13/2/20137/6/20121.9125
53/11/20101.4259388/6/20121.96875
64/11/20101.47645811/6/20121.874583
75/11/20101.47822912/6/20121.93375
87/10/20111.33604213/6/20121.895833
910/10/20111.4731256/2/20132.354167
1011/10/20111.5045837/2/20132.36
117/6/20121.91258/2/20132.431667
128/6/20121.9687511/2/20132.430833
1311/6/20121.87458312/2/20132.4025
1412/6/20121.9337513/2/20132.430417
1513/6/20121.895833
166/2/20132.354167
177/2/20132.36
188/2/20132.431667
1911/2/20132.430833
2012/2/20132.4025
2113/2/20132.430417
2214/2/20132.425417
2315/2/20132.404583
2419/2/20132.457083
2520/2/20132.345
2621/2/20132.26875
Sheet1


Table 1 is the data table

Table 2 is the dates for selection.

In Table 3, I am trying to populate only the dates and prices based on the selection in Table 2. I am able to use xlookup for the first date to populate but I am not sure how to continue to populate for the rest of the dates and price.

=XLOOKUP(G3,C4:C26,C4:C26)

The expected results is in Table 3

Appreciate all the help. Thank you in advance
 

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.
Try the ARRAY formula in the 'I4' cell (copy down)
Code:
=IF(ROWS($4:4)<=SUM(($C$4:$C$22>=$G$3)*($C$4:$C$22<=$G$4)),INDEX($C:$C,SMALL(IF(($C$4:$C$22>=$G$3)*($C$4:$C$22<=$G$4),ROW($C$4:$C$22)),ROWS($4:4))),"")

In the 'J4' cell the formula below
Code:
=IFERROR(VLOOKUP(I4,$C$4:$D$26,2,FALSE),"")
 

Attachments

  • kumara_faith.png
    kumara_faith.png
    13.7 KB · Views: 17
Upvote 0
Solution
Hi Navic,

That worked. Thank you for your valuable time and patience. Appreciate it and have a great day.
 
Upvote 0
Another option
+Fluff 1.xlsm
CDEFGHIJ
1
2Table 1Table 2Table 3
3DatePriceStart Date07/06/2012DatePrice
402/11/20101.405625End Date13/02/201307/06/20121.9125
503/11/20101.42593808/06/20121.96875
604/11/20101.47645811/06/20121.874583
705/11/20101.47822912/06/20121.93375
807/10/20111.33604213/06/20121.895833
910/10/20111.47312506/02/20132.354167
1011/10/20111.50458307/02/20132.36
1107/06/20121.912508/02/20132.431667
1208/06/20121.9687511/02/20132.430833
1311/06/20121.87458312/02/20132.4025
1412/06/20121.9337513/02/20132.430417
1513/06/20121.895833
1606/02/20132.354167
1707/02/20132.36
1808/02/20132.431667
1911/02/20132.430833
2012/02/20132.4025
2113/02/20132.430417
2214/02/20132.425417
2315/02/20132.404583
2419/02/20132.457083
2520/02/20132.345
2621/02/20132.26875
Main
Cell Formulas
RangeFormula
I4:J14I4=FILTER(C4:D26,(C4:C26>=G3)*(C4:C26<=G4))
Dynamic array formulas.
 
Upvote 0
Hi Fluff,

Thank you for your solution. It worked as well. Appreciate your time and valuable input. Have a great day.
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,780
Messages
6,121,527
Members
449,037
Latest member
tmmotairi

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