Possible Index Aggregate formula required

ronie85

Board Regular
Joined
Jan 25, 2014
Messages
101
Office Version
  1. 365
Platform
  1. Windows
Hi All

I require a formula using the below list that has been created, and using Aberdeen as an example, assuming they appear 50 times in the A column with their result in the B column.

1697656707731.png



I need a formula to record their first appearance on the above list using cell A2 on the below list, and show the "result" from the B column in the above list, into cell E2 below.
Then the "result" from their 2nd appearance on the above list to show within cell F2 below, and so on.

I will then use this formula in Row 3 for the next Team, repeating this.

1697656667581.png
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
try this
-----------
Book1
ABCDEFGHIJKLM
1teamresultteamseasonleague1234567
2aberdeendrawaberdeen22/23s1drawvoidlostwin
3st johnstonedrawst johnstone22/23s1draw
4airdrieonianslostvoid22/23s1voidvoid
5ayr unitedwin
6voidvoid
7voidvoid
8inverness caledonian thistledraw
9patrick thistledraw
10queens parkdraw
11mortondraw
12raith roversdraw
13dundee uniteddraw
14cove rangerswin
15annan athleticlost
16edinburrh citylost
17kelty heartswin
18montrosewin
19alloa atheleticlost
20aberdeenvoid
21aberdeenlost
22aberdeenwin
Sheet1
Cell Formulas
RangeFormula
G2:J2,G4:H4,G3G2=TRANSPOSE(FILTER($B$2:$B$22,$A$2:$A$22=D2,""))
Dynamic array formulas.
 
Upvote 0
try this
-----------
Book1
ABCDEFGHIJKLM
1teamresultteamseasonleague1234567
2aberdeendrawaberdeen22/23s1drawvoidlostwin
3st johnstonedrawst johnstone22/23s1draw
4airdrieonianslostvoid22/23s1voidvoid
5ayr unitedwin
6voidvoid
7voidvoid
8inverness caledonian thistledraw
9patrick thistledraw
10queens parkdraw
11mortondraw
12raith roversdraw
13dundee uniteddraw
14cove rangerswin
15annan athleticlost
16edinburrh citylost
17kelty heartswin
18montrosewin
19alloa atheleticlost
20aberdeenvoid
21aberdeenlost
22aberdeenwin
Sheet1
Cell Formulas
RangeFormula
G2:J2,G4:H4,G3G2=TRANSPOSE(FILTER($B$2:$B$22,$A$2:$A$22=D2,""))
Dynamic array formulas.
Amazing! Thanks a lot for the quick response and it works just as I needed!
 
Upvote 0
happy to help.
if the solution works for you, please consider marking it as a solution for others to find as well
 
Upvote 0
Alternative solution with Power query

Power Query:
let
    Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
    #"Grouped Rows" = Table.Group(Source, {"team"}, {{"Data", each _, type table [team=text, result=text]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.AddIndexColumn([Data], "Index",1,1)),
    #"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Data"}),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Removed Columns", "Custom", {"result", "Index"}, {"result", "Index"}),
    #"Pivoted Column" = Table.Pivot(Table.TransformColumnTypes(#"Expanded Custom", {{"Index", type text}}, "en-US"), List.Distinct(Table.TransformColumnTypes(#"Expanded Custom", {{"Index", type text}}, "en-US")[Index]), "Index", "result")
in
    #"Pivoted Column"
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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