Using an ARRAY_CONSTRAIN
formula we want to capture the latest 9 records (rows) over a period of nonconsecutive dates.
=ARRAY_CONSTRAIN(sort(vlookup(query({row(EBPP!D:D),sort(EBPP!A:E)},Q15,0),
{row(EBPP!D:D),sort(EBPP!A:E)},{2,3,4,5,6},0),4,0),R8,5)
Points to consider:
- Cell
Q15
holds the query - Cell
R8
will hold the part we need for the dates.
Please have a look at the image.
Spreadsheet added.
RESULTS
is editable so you can use it for testing. – marikamitsos May 21 at 0:39