SOLVED

Finding date value on or after specific date

%3CLINGO-SUB%20id%3D%22lingo-sub-2024485%22%20slang%3D%22en-US%22%3EFinding%20date%20value%20on%20or%20after%20specific%20date%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2024485%22%20slang%3D%22en-US%22%3EHi%20i%20have%20an%20issue%2C%20i%20have%20a%20set%20of%20data%2C%20column%20F%20and%20G%20however%20they%20are%20supposedly%20in%20Sheet2.%3CBR%20%2F%3EIn%20sheet%201%20i%20have%20the%203%20exercises%20and%20i%20need%20to%20find%20the%20next%20nearest%20date%20matching%20to%20the%20exercise%20and%20date%20indicated%20in%20column%20D.%20Not%20sure%20what%20formula%20i%20should%20use%3F%20Thank%20you%20for%20helping%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2024485%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2024603%22%20slang%3D%22en-US%22%3ERe%3A%20Finding%20date%20value%20on%20or%20after%20specific%20date%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2024603%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F915010%22%20target%3D%22_blank%22%3E%40Sk8free%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EEnter%20the%20following%20formula%20in%20A2%20and%20confirm%20it%20with%20Ctrl%2BShift%2BEnter%20to%20turn%20it%20into%20an%20array%20formula%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DINDEX(Sheet2!%24G%242%3A%24G%2413%2CMATCH(MIN(IF((Sheet2!%24F%242%3A%24F%2413%3DA%241)*(Sheet2!%24G%242%3A%24G%2413%26gt%3B%3D%24D2)%2CSheet2!%24G%242%3A%24G%2413-%24D2))%2CIF((Sheet2!%24F%242%3A%24F%2413%3DA%241)*(Sheet2!%24G%242%3A%24G%2413%26gt%3B%3D%24D2)%2CSheet2!%24G%242%3A%24G%2413-%24D2)%2C0))%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFormat%20A2%20as%20a%20date%2C%20then%20fill%20right%20to%20C3%20and%20down%20to%20row%205.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New 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 (New 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!!