
Originally Posted by
ChemistB
Okay, since the reserve lineup would not have looked good with all those blank spaces, I decided to clean it all up.
Here's what the new formulas do and then I'll give you the formulas. We'll look at goalkeepsing in a 3-4-3 formation (Column E of Squad)
It compares each goalkeeper in A3:A5 to see if it's already been used, if not it assigns a number from 1 to 3. If it's been used, you get an error (which Excel later ignores). So if John Ruddy was used, it comes up with 1, Error, 3. It commits these to member (as an array). Then the formula says pull the smallest value and put it in E3, second smallest in E4 and so on.
The ARRAY formula in E3 copied down to E5 is
=IFERROR(INDEX($A$3:$A$5, SMALL(IF(ISERROR(MATCH($A$3:$A$5, '3-4-3'!$C$10:$C$20,0)), ROW($A$3:$A$5)-2), ROWS($A$1:$A1))),"")
...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.
I used this same technique to make a seamless list of reserves starting in E33 to E5
See attachment. Is this good for you?
Bookmarks