Nesting in an Index Match

john62290

New Member
Joined
Dec 15, 2021
Messages
28
Office Version
  1. 365
Platform
  1. Windows
Hello. I am looking for a formula that searches for the latest date in the column date of a table and returns the order associated with the latest date. For example, in the below table, the last order for Account 2 is 25. Would this be nesting a maxifs in an index match formula? I appreciate your help. (Admin won't allow me to download XL2BB; I am assuming this is Table 1, and the headers are the titles in the table.)
AccountDateOrder
Account 1
1/3/2023​
25
Account 22/3/2023150
Account 13/4/202325
Account 33/19/202350
Account 24/3/202325
Account 25/1/202325
Account 35/12/202350
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
Are you looking to return the latest order for JUST Account 2, or for all three accounts?
 
Upvote 0
OK, here I show your original data and my results:

1694446726447.png


Formula in cell F2:
Excel Formula:
=UNIQUE(A2:A8)

Formula in cell G2 (and copy down to G3:G4):
Excel Formula:
=FILTER(B2:C8,B2:B8=MAXIFS(B2:B8,A2:A8,F2))
 
Upvote 0
OK, here I show your original data and my results:

View attachment 98565

Formula in cell F2:
Excel Formula:
=UNIQUE(A2:A8)

Formula in cell G2 (and copy down to G3:G4):
Excel Formula:
=FILTER(B2:C8,B2:B8=MAXIFS(B2:B8,A2:A8,F2))
This should work, but I have more data in my table than here. If the date is in B and the matching orders aren't until column F or G, would the filter be B2:G8?
 
Upvote 0
One of the best ways to learn is to try these things out for yourself.
See here for more help on the FILTER function: FILTER function - Microsoft Support

If you cannot get it to work the way you want, please post an example of your real data structure, and show us your desired result.
 
Upvote 0
One of the best ways to learn is to try these things out for yourself.
See here for more help on the FILTER function: FILTER function - Microsoft Support

If you cannot get it to work the way you want, please post an example of your real data structure, and show us your desired result.
I feel like I am close. That formula you shared is for the date. What did you use in column H? Thanks
 
Upvote 0
I feel like I am close. That formula you shared is for the date. What did you use in column H? Thanks
Nothing. The formula in column G is a Spill function that returns multiple columns. So the value in column H comes from the formula in column G.
This is because I am telling the FILTER function to return 2 columns:
Rich (BB code):
=FILTER(B2:C8
 
Upvote 0

Forum statistics

Threads
1,215,365
Messages
6,124,513
Members
449,168
Latest member
CheerfulWalker

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top