Index/Match Array to find closest date AND match secondary criteria

dan_web

New Member
Joined
Jul 1, 2014
Messages
6
Hi everyone,

I have a workbook with 2 worksheets. The first worksheet has dates in column A, company name in column B

The second worksheet is called "Reference" and it has most recent order date in column A and company name in column B

I'm trying to match the date in sheet 1 to the closest date in sheet 2 for each company and return the date they ordered in column C of woorksheet 1

(The same company can appear in both worksheets multipe times)




(Sheet 1)ABC
(a funktion that return a value from "Reference")
115.02.2021Company 1
229.01.2021Company 1
301.04.2021Company 1
403.04.2021Company 2


(Reference)AB
115.02.2021Company 1
201.02.2021Company 1
301.02.2021Company 2
401.03.2021Company 1

Thank you in advance.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,214,988
Messages
6,122,620
Members
449,092
Latest member
amyap

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