How to include "Aggregate" to index match

Patcheen

Active Member
Joined
Sep 28, 2015
Messages
388
Office Version
  1. 365
Platform
  1. Windows
HI all

Im currently using this formula

=INDEX(EMD!A2:A2000,MATCH(1,(U1=EMD!B2:B2000)*(V1=EMD!C2:C2000),0))

a2:a2000 are dates

B2:B2000 is numbers 100 to 1000 and c2:c2000 are also numbers 100 to 1000

im trying to include Aggregate so i can see when 2 numbers appeared together more recently.

the above formula works perfectly but only gives me the first time they appeared together

TIA
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Since you have Excel 365. Maybe use the FILTER function.

Book2
ABCDTUV
1DateNumber1Number2100200
210/25/2023100200Dates
310/26/202320040010/25/2023
410/27/202310030010/31/2023
510/28/202330030011/2/2023
610/29/2023400200
710/30/2023150160
810/31/2023100200
911/1/2023260365
1011/2/2023100200
1111/3/2023560235
1211/4/20231001000
Sheet1
Cell Formulas
RangeFormula
U3:U5U3=FILTER(A2:A2000,(B2:B2000=$U$1)*(C2:C2000=$V$1))
Dynamic array formulas.
 
Upvote 0
thank you for the quick reply

=FILTER(A2:A2000,(B2:B2000=$U$1)*(C2:C2000=$V$1)) where in here do i reference the sheet EMD

My original - =INDEX(EMD!A2:A2000,MATCH(1,(U1=EMD!B2:B2000)*(V1=EMD!C2:C2000),0))


Thank you again for your help
 
Upvote 0
=FILTER(EMD!A2:A2000,(EMD!B2:B2000=$U$1)*(EMD!C2:C2000=$V$1))
 
Upvote 0
Thank you again for the reply

but when i enter formula it auto fills the column and greys it out.
 
Upvote 0
Thank you again for the reply

but when i enter formula it auto fills the column and greys it out.
Here is an example

1699710729244.png
 
Upvote 0
Need a little more explanation. Your formula refers to columns A, B, C, which are not in your example. Is column AB only showing 22/05/2015 because that is the only date that has 100 & 200 in columns N &O? What about an example if there is more than one answer. What do the yellow highlighted cells in columns N thru T represent?
 
Upvote 0
Since you said your INDEX formula works, here is an example using AGGREGATE. You will probably need to change some of the cell references to match your data.

Book1
TUV
1100200
2Dates
310/25/2023
410/31/2023
511/2/2023
Sheet2
Cell Formulas
RangeFormula
U3:U5U3=IFERROR(INDEX(EMD!$A$2:$A$12,AGGREGATE(15,6,(ROW(EMD!$A$2:$A$12)-ROW(EMD!$A$2)+1)/((EMD!$B$2:$B$12=$U$1)*(EMD!$C$2:$C$12=$V$1)),ROWS($U$3:U3))),"")


EMD sheet
Book1
ABC
1DateNumber1Number2
210/25/2023100200
310/26/2023200400
410/27/2023100300
510/28/2023300300
610/29/2023400200
710/30/2023150160
810/31/2023100200
911/1/2023260365
1011/2/2023100200
1111/3/2023560235
1211/4/20231001000
EMD
 
Upvote 0
all i want is to my original formula is to add aggregate (i think that is what it's missing) to it so i get the latest date the numbers last appeared together. as per example

on the 22/05/15 100 and 200 appeared together

on the 05/06/15 100 138 and 150 appeared together

on the 19/06/2015 100 125 175 and 150 appeared together

on the 03/07/2015 100 105 101 180 and 150 appeared together

on the 17/07/2015 100 172 183 168 111 185 and 179 appeared together

im trying to get those dates over on the right ihand side in column AB

the yellow nums are the ones that are in reference to U1:AA1

in AB2 should be 22/05/2015 -- in AB3 should be 05/06/2015 -- in AB4 should be 19/07/2015 -- In AB5 Should be 03/07/2015 in AB6 should be 17/07/2015.


|A b and C are not in the example above as this example is not from the original book i put this together to try make it easier so it can be seen as a whole.


Again i thank you for your time and help appreciate it.
 
Upvote 0
How about
Excel Formula:
=TAKE(SORT(FILTER(EMD!A2:A2000,(U1=EMD!B2:B2000)*(V1=EMD!C2:C2000)),,-1),1)
 
Upvote 0
Solution

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,096
Latest member
Anshu121

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