I'm essentially trying to lookup multiple items located in the data table in column 2 and return the corresponding order number from column 1 IF all the items match.
I was thinking I may have to utilise the xlookup function, and a few IFs, in conjunction with other functions - or it may only be achievable via VBA?
Any tips or advice would be greatly appreciated as I'm really not sure how to begin this one or what search terms to enter to try to find solutions and/or adivce.
Please let me know if I can provide anymore info to assist with this query.
(Version: Office 2021)
Markdown version of data table:
| Order No. | Item | Qty | Order Date |
|---|---|---|---|
| 001 | Apple | 2 | 30/01/2024 |
| 001 | Banana | 1 | 30/01/2024 |
| 001 | Pear | 1 | 30/01/2024 |
| 002 | Cherries | 4 | 02/02/2024 |
| 003 | Banana | 2 | 08/02/2024 |
| 004 | Apple | 3 | 15/02/2024 |
| 004 | Cherries | 5 | 15/02/2024 |
| 005 | Pear | 2 | 24/02/2024 |
Many thanks

May be there is more elegant way of doing this perhaps using a helper column to achieve the desired output for the version of Excel as mentioned in the OP:
Excel2021• Formula used in cell G3
While the helper column formula is:
Edit: 3/1/2024
As per new comments of OP:
Change in both of the formulas to ensure it work accordingly as per the given conditions. Additionally, it will also exclude duplicates for same order, if may arise.
• For Helper:
• For Matching Order: