VLOOKUP or INDEX/MATCH if date falls within range and value matches

NAS__

New Member
Joined
Jun 29, 2017
Messages
1
Table 1:

[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]Date[/TD]
[TD]Code[/TD]
[TD]Price[/TD]
[TD]Ideal Price[/TD]
[/TR]
[TR]
[TD]01/01/2017[/TD]
[TD]7[/TD]
[TD]?[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]02/02/2017[/TD]
[TD]4[/TD]
[TD]?[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]03/03/2017[/TD]
[TD]7[/TD]
[TD]?[/TD]
[TD]80[/TD]
[/TR]
</tbody>[/TABLE]







Table 2:
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Sale Date[/TD]
[TD]Code[/TD]
[TD]Price[/TD]
[/TR]
[TR]
[TD]01/10/2017[/TD]
[TD]4[/TD]
[TD]$70[/TD]
[/TR]
[TR]
[TD]03/02/2017[/TD]
[TD]4[/TD]
[TD]$65[/TD]
[/TR]
[TR]
[TD]03/06/2017[/TD]
[TD]7[/TD]
[TD]$80[/TD]
[/TR]
</tbody>[/TABLE]

I want to populate table 1 prices based on a combination of matching codes and a matching date range, say +/-10 days.
I think I might need an array formula that will allow me to search for codes within an array of rows that meet the date criteria but I'm a rookie and I'm not sure I understand how those work. Thanks!
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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