Closest date based on 1st transaction date, Mutiple criteria in Excel

I have 2 tables, 1 with TransictionDate_1 & 2nd table with TransictionDate_2. Both tables contain duplicate IDs.

I need to match TransictionDate_2 which nearest occurrence after TransictionDate_1. I have tried few Array and ABS formulas but getting inconsistence result. Below tables for more explanation.

enter image description here


  • Try using the following formula, based on ones Excel Version may required to hit CTRL+SHIFT+ENTER while exiting the edit mode.

    enter image description here


    Or, if you have access to MS365 then do the following:

    enter image description here