Summary Report

Status
Not open for further replies.

Steve 1962

Active Member
Joined
Jan 3, 2006
Messages
379
Office Version
  1. 365
Platform
  1. Windows
Hi
I am attempting to summarize a team’s play report. Columns A, B & C is the playing program (Week No. / Team location (away or home)).

I require this to be summarized in Columns E to H specifically, column F to show which team the team noted in cell F1 played in the nominated round shown in column E and also its location HOME if located in column B or AWAY if located in column C. Cells F2 to G5 require the solution formula. In this example, Team – 2 is being analysed (cell F1).

Column H is nothing – I have just provided it to show the rows from which the data need to be extracted.

Thanks


Book1
ABCDEFGH
1WeekHome - TeamAway - TeamWeekTeam - 2LocationComments
21Team - 1Team - 21Team - 1Away(row 2)
31Team - 3Team - 42Team - 7Home(row 6)
41Team - 5Team - 63Team - 3Away(row 11)
51Team - 7Team - 84Team - 5Home(row 16)
62Team - 2Team - 7
72Team - 3Team - 4
82Team - 5Team - 6
92Team - 8Team - 1
103Team - 1Team - 4
113Team - 3Team - 2
123Team - 5Team - 7
133Team - 6Team - 8
144Team - 8Team - 7
154Team - 6Team - 4
164Team - 2Team - 5
174Team - 3Team - 1
Sheet1
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I did but noticed some error, but try this. This assmes that your column A is already in order. Until someone comes up with a prettier solution...
Book1
ABCDEFG
1WeekHome - TeamAway - TeamWeekTeam - 8Location
21Team - 2Team - 11Team - 7Away
31Team - 3Team - 42Team - 1Home
41Team - 5Team - 63Team - 6Away
51Team - 7Team - 84Team - 7Home
62Team - 2Team - 7
72Team - 3Team - 4
82Team - 5Team - 6
92Team - 8Team - 1
103Team - 1Team - 4
113Team - 3Team - 2
123Team - 5Team - 7
133Team - 6Team - 8
144Team - 8Team - 7
154Team - 6Team - 4
164Team - 2Team - 5
174Team - 3Team - 1
Sheet1
Cell Formulas
RangeFormula
F2:G5F2=LET(f,FILTER(B2:C17,(B2:B17=F1)+(C2:C17=F1)), br,BYROW(f,LAMBDA(r,MATCH($F$1,r,0))), loc,CHOOSE(br,"Home","Away"), team,FILTER(TOCOL(f),TOCOL((f))<>F1), HSTACK(team,loc))
Dynamic array formulas.
 
Last edited:
Upvote 0
Thanks Cubist

I'll keep working with it. I must have done something wrong as I'm now getting a #SPILL! issue.
 
Upvote 0
It's a spilled array. You only need to insert in formula in cell F2.
This option incorporates the week as well. Insert this into E2 only.
Excel Formula:
=LET(
f,FILTER(B2:C17,(B2:B17=F1)+(C2:C17=F1)),
w,FILTER(A2:A17,(B2:B17=F1)+(C2:C17=F1)),
br,BYROW(f,LAMBDA(r,MATCH($F$1,r,0))),
loc,CHOOSE(br,"Home","Away"),
team,FILTER(TOCOL(f),TOCOL((f))<>F1),
HSTACK(w,team,loc))
 
Upvote 0
Another version for, Excel 2010 or newer

X day high low.xlsx
ABCDEFG
1WeekHome - TeamAway - TeamWeekTeam - 2Location
21Team - 1Team - 21Team - 1Away
31Team - 3Team - 42Team - 7Home
41Team - 5Team - 63Team - 3Away
51Team - 7Team - 84Team - 5Home
62Team - 2Team - 7
72Team - 3Team - 4
82Team - 5Team - 6
92Team - 8Team - 1
103Team - 1Team - 4
113Team - 3Team - 2
123Team - 5Team - 7
133Team - 6Team - 8
144Team - 8Team - 7
154Team - 6Team - 4
164Team - 2Team - 5
174Team - 3Team - 1
Sheet1
Cell Formulas
RangeFormula
F2:F5F2=IFERROR(LOOKUP(2,1/($A$2:$A$17=$E2)/($C$2:$C$17=$F$1),$B$2:$B$17),LOOKUP(2,1/($A$2:$A$17=$E2)/($B$2:$B$17=$F$1),$C$2:$C$17))
G2:G5G2=CHOOSE(AGGREGATE(15,6,COLUMN($B$1:$C$1)/($B$2:$C$17=F2)/($A$2:$A$17=E2)-1,1),"Away","Home")
 
Upvote 0
Hi Bebo

Thanks very much - works fine.

I have decided to place the data from columns A, B & C (which you referred to above in your reply) into a separate worksheet. I have provided a screenshot of that on the right-hand side below.

I have attempted to modify your formula so that it reads from the separate worksheet. I have had success modifying the formulas in cells F2:F5 to source the separate worksheet but obviously the

CHOOSE or AGGREGATE in cells G2:G5 doesn't like the move. What do I need to do to get the formulas in cells G2:G5 to source the separate worksheet.

The data in the separate worksheet is an EXCEL TABLE, therefore when referencing the data, instead of accepting the actual cell reference, by default the table name is inserted (as opposed to a cell reference).

Hoping you can help.

Thanks


1713584080581.png
 
Upvote 0
Jus come back from weekend.
Yes, its nice to hear it works.
Further request, feel free to ask.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,885
Messages
6,175,180
Members
452,615
Latest member
bogeys2birdies

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