Dec 31 2020 07:09 AM
Dec 31 2020 08:00 AM
SolutionEnter the following formula in A2 and confirm it with Ctrl+Shift+Enter to turn it into an array formula:
=INDEX(Sheet2!$G$2:$G$13,MATCH(MIN(IF((Sheet2!$F$2:$F$13=A$1)*(Sheet2!$G$2:$G$13>=$D2),Sheet2!$G$2:$G$13-$D2)),IF((Sheet2!$F$2:$F$13=A$1)*(Sheet2!$G$2:$G$13>=$D2),Sheet2!$G$2:$G$13-$D2),0))
Format A2 as a date, then fill right to C3 and down to row 5.
Dec 31 2020 08:09 AM
Perhaps XLOOKUP() with 1 as 5th parameter will work.
Jan 01 2021 07:24 AM
Dec 31 2020 08:00 AM
SolutionEnter the following formula in A2 and confirm it with Ctrl+Shift+Enter to turn it into an array formula:
=INDEX(Sheet2!$G$2:$G$13,MATCH(MIN(IF((Sheet2!$F$2:$F$13=A$1)*(Sheet2!$G$2:$G$13>=$D2),Sheet2!$G$2:$G$13-$D2)),IF((Sheet2!$F$2:$F$13=A$1)*(Sheet2!$G$2:$G$13>=$D2),Sheet2!$G$2:$G$13-$D2),0))
Format A2 as a date, then fill right to C3 and down to row 5.