SOLVED

Finding date value on or after specific date

Copper Contributor
Hi i have an issue, i have a set of data, column F and G however they are supposedly in Sheet2.
In sheet 1 i have the 3 exercises and i need to find the next nearest date matching to the exercise and date indicated in column D. Not sure what formula i should use? Thank you for helping
3 Replies
best response confirmed by Sk8free (Copper Contributor)
Solution

@Sk8free 

Enter 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.

@Sk8free 

Perhaps XLOOKUP() with 1 as 5th parameter will work.

Hi thank you!!! Solution works!!
1 best response

Accepted Solutions
best response confirmed by Sk8free (Copper Contributor)
Solution

@Sk8free 

Enter 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.

View solution in original post