Hi All,
I would like to search a table and return the Nth largest number between to dates, whilst also matching the customers name and/or if the order value is over a certain amount.
Sample data set as follows:
Expected results:
I am using Excel 2016.
I would like to search a table and return the Nth largest number between to dates, whilst also matching the customers name and/or if the order value is over a certain amount.
Sample data set as follows:
Order_Name | Order_Date | Order_Value |
---|---|---|
Smith | 01/01/2022 | 1,000.00 |
Smith | 01/02/2022 | 2,000.00 |
Smith | 01/04/2022 | 3,000.00 |
Jones | 01/01/2022 | 4,000.00 |
Jones | 01/02/2022 | 5,000.00 |
Jones | 01/04/2022 | 6,000.00 |
Jones | 01/01/2022 | 7,000.00 |
Smith | 01/02/2022 | 8,000.00 |
Kaur | 01/04/2022 | 9,000.00 |
Singh | 01/01/2022 | 10,000.00 |
Kaur | 01/02/2022 | 11,000.00 |
Kaur | 01/04/2022 | 12,000.00 |
Smith | 01/01/2023 | 12,000.00 |
Smith | 01/02/2023 | 11,000.00 |
Smith | 01/04/2023 | 10,000.00 |
Jones | 01/01/2023 | 9,000.00 |
Jones | 01/02/2023 | 8,000.00 |
Jones | 01/04/2023 | 7,000.00 |
Jones | 01/01/2023 | 6,000.00 |
Smith | 01/02/2023 | 5,000.00 |
Kaur | 01/04/2023 | 4,000.00 |
Singh | 01/01/2023 | 3,000.00 |
Kaur | 01/02/2023 | 2,000.00 |
Kaur | 01/04/2023 | 1,000.00 |
Expected results:
Name | Smith | Name | Kaur | |
Start Period | 01/01/2022 | Start Period | 01/01/2023 | |
End Period | 31/12/2022 | End Period | 31/12/2023 | |
Orders Over | 0 | Order Value | 1500 | |
Result | Result | |||
1st Highest | 8000 | 1st Highest | 4000 | |
2nd Highest | 3000 | 2nd Highest | 2000 | |
3rd Highest | 2000 | 3rd Highest | Nil |
I am using Excel 2016.