As you are using Office 365 you can use new functions SORT and FILTER for instance this way:
So first you filter only these elenets, where invoice is the same as in A2 and value is not larger than in B2
FILTER(Sheet1!A2:C6,(Sheet1!B2:B6<=B2)*(Sheet1!A2:A6=A2))
then you sort on column 2 descending
SORT( result of FILTER ,2,-1)
the desired result is in topmost row of sorted array, in third column, so you pick it by using INDEX
INDEX( result of SORT ,1,3)
I finally added IFERROR, to deal with situation where there is no such situation (say Invoice3 or value of 1000
Bookmarks