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

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.

Forum statistics

Threads
1,214,918
Messages
6,122,252
Members
449,075
Latest member
staticfluids

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