[Solved] I need to be able to match a date and store number to an array that has the store numbers, a date range and return the PO Number on that line


If the search date is in G1…

If the search store is in G2…

If the data are in columns A, B, C, and D…

You can use this formula to return the first PO# where the search date is between the Start and End dates and where the search store matches Store #:

=INDEX(D:D,MATCH(1,(A1:A999<=G1)*(B1:B999>=G1)*(C1:C999=G2),))

This is an array formula and must be confirmed with Ctrl+Shift+Enter.

Note: if your data extend further down than row 999, change the 999s in the formula to a suitable row number.

10

solved I need to be able to match a date and store number to an array that has the store numbers, a date range and return the PO Number on that line