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.
Try using the following formula, based on ones Excel Version
may required to hit CTRL+SHIFT+ENTER while exiting the edit mode.
=IFERROR(INDEX(Tbl_2[Transaction2_Date],
MATCH(1,1/(([@ID]=Tbl_2[ID])*([@[Transaction1_Date]]<Tbl_2[Transaction2_Date])),-1)),"NA")
Or, if you have access to MS365
then do the following:
=IFERROR(MIN(FILTER(Tbl_2[Transaction2_Date],(([@ID]=Tbl_2[ID])*([@[Transaction1_Date]]<Tbl_2[Transaction2_Date])))),"NA")