Why does this cause a SPILL error?

tigerzen

Board Regular
Joined
Mar 8, 2023
Messages
209
Office Version
  1. 365
Platform
  1. Windows
Simple spreadsheet that should return the game that recorded the particular winning margin. The repeat value (50) causes a SPILL error and I can't work out why.

Book1
BCDEFGHIJK
2Team 1Team 2MarginYearBiggest marginsGame
3DragonsCrocs34201250#SPILL!
4DragonsEagles50201350#SPILL!
5DragonsFalcons18201434DragonsCrocs342012
6DragonsCrows502015
7DragonsBullets122016
Sheet10
Cell Formulas
RangeFormula
G3:G5G3=LARGE($D$3:$D$7,ROW(A1))
H3:H4,H5:K5H3=FILTER($B$3:$E$7,$D$3:$D$7=G3)
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Your FILTER FUNCTION is returning two rows in both H3 and H4. This is because you have two values of 50 (your largest margin). You need to have some kind of tiebreaker system.
 
Upvote 0
Your FILTER FUNCTION is returning two rows in both H3 and H4. This is because you have two values of 50 (your largest margin). You need to have some kind of tiebreaker system.
Thanks Awoohaw, what would be the simplest way?
 
Upvote 0
Here is an option using INDEX.

Book1
BCDEFGHIJK
2Team 1Team 2MarginYearBiggest marginsGame
3DragonsCrocs34201250DragonsEagles502013
4DragonsEagles50201350DragonsCrows502015
5DragonsFalcons18201434DragonsCrocs342012
6DragonsCrows502015
7DragonsBullets122016
Sheet1
Cell Formulas
RangeFormula
G3:G5G3=LARGE($D$3:$D$7,ROW(A1))
H3:K5H3=INDEX($B$3:$E$7,AGGREGATE(15,6,(ROW($D$3:$D$7)-ROW($D$3)+1)/($D$3:$D$7=$G3),COUNTIF($G$3:G3,G3)),0)
Dynamic array formulas.
 
Upvote 0
Here is an option using INDEX.

Book1
BCDEFGHIJK
2Team 1Team 2MarginYearBiggest marginsGame
3DragonsCrocs34201250DragonsEagles502013
4DragonsEagles50201350DragonsCrows502015
5DragonsFalcons18201434DragonsCrocs342012
6DragonsCrows502015
7DragonsBullets122016
Sheet1
Cell Formulas
RangeFormula
G3:G5G3=LARGE($D$3:$D$7,ROW(A1))
H3:K5H3=INDEX($B$3:$E$7,AGGREGATE(15,6,(ROW($D$3:$D$7)-ROW($D$3)+1)/($D$3:$D$7=$G3),COUNTIF($G$3:G3,G3)),0)
Dynamic array formulas.
Thanks Ahoy.
 
Upvote 0
You could replace all your formulas with something like:

Excel Formula:
=SORT(FILTER($B$3:$E$7,$D$3:$D$7>=LARGE(D3:D7,3)),3,-1)
 
Upvote 0
Another option
Fluff.xlsm
ABCDEFGHI
1
2Team 1Team 2MarginYearBiggest marginsGame
3DragonsCrocs34201250DragonsEagles
4DragonsEagles50201350DragonsCrows
5DragonsFalcons18201434DragonsCrocs
6DragonsCrows502015
7DragonsBullets122016
Master
Cell Formulas
RangeFormula
G3:I5G3=TAKE(SORT(CHOOSECOLS(B3:D7,3,1,2),,-1),3)
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,637
Messages
6,173,489
Members
452,515
Latest member
archcalx

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