This method avoids using complicated array formulas by using a helper column in sheet "Fixtures Data"
I am using the original workbook linked by you - please use the same workbook!!
- let me know how you get on...
1 Add a worksheet and name it "
Teams"
2 Copy your 20 team names from "
Fixtures Data" and paste into sheet "
Teams" A1:A20
- you can copy
F4:F13 and paste to
A1, copy
I4:I13 and paste to
A11
- the names must EXACTLY match so copy/paste is safer than manual typing!
3 Select "
Teams"
A1:A20 \ click FORMULA tab \ click DEFINE NAME \ type "ListOfTeams" in NAME box \ click OK
AND sort alphabetically: Select
A1:A20 \ click DATA tab \ click SORT \ sort by column A \ order A-Z \ cick OK
(will be using this named range in Dropdown)
4 Rename sheet "Bandon" and name it "
Any Team"
5 Sheet "
Any Team" \ select
J1 \ click DATA tab \ click DataValidation \ in ALLOW select LIST \ in SOURCE type
=ListOfTeams \ click OK
(dropdown of team names should now be available)
6 Select BRANDON from the dropdown
7 Sheet "
Fixtures Data" delete column
J (the column not the contents)
( we are going to use this as a helper column, but at the moment it contains some merged cells which we do not want)
8 Sheet "
Fixtures Data" copy
I2 and paste to
J2 \ amend
J2 value to "HELPER"
(the copy&paste makes it easy to merged cells & match formatting)
9 Sheet "
Fixtures Data" formula in
J4 and copy down
=COUNTIF($F$4:F4,'Any Team'!$J$1)*(OR(F4='Any Team'!$J$1,I4='Any Team'!$J$1))+COUNTIF($I$4:I4,'Any Team'!$J$1)*(OR(F4='Any Team'!$J$1,I4='Any Team'!$J$1))
10 Most of the values in column
J are zero EXCEPT
J9 = 1 and
J19 = 2
(these values will be used in the MATCH formula used in sheet "Any Team")
AND in G9 enter value "
2", in H9 enter value "
1" (ie Bandon won 2-1)
AND in G19 enter value "
1", in H19 enter value "
4" (ie Bandon won 4-1)
11 In sheet "
Any Team" delete rows 7 to 20 (the rows NOT the contents)
(we want to remove all the merged cells etc)
12 In sheet "
Any Team"
Formula in
A6
=ROW()-5
Formula in
B6
=INDEX('Fixtures Data'!C$4:C$1000,MATCH('Any Team'!$A6,'Fixtures Data'!$J$4:$J$1000,0))
Formula in
D6
=INDEX('Fixtures Data'!F$4:F$1000,MATCH('Any Team'!$A6,'Fixtures Data'!$J$4:$J$1000,0))
Formula in
E6
=IF(INDEX('Fixtures Data'!G$4:G$1000,MATCH('Any Team'!$A6,'Fixtures Data'!$J$4:$J$1000,0))="","",INDEX('Fixtures Data'!G$4:G$1000,MATCH('Any Team'!$A6,'Fixtures Data'!$J$4:$J$1000,0)))
Formula in
G6
=INDEX('Fixtures Data'!I$4:I$1000,MATCH('Any Team'!$A6,'Fixtures Data'!$J$4:$J$1000,0))
Formula in
H6
=IF(INDEX('Fixtures Data'!H$4:H$1000,MATCH('Any Team'!$A6,'Fixtures Data'!$J$4:$J$1000,0))="","",INDEX('Fixtures Data'!H$4:H$1000,MATCH('Any Team'!$A6,'Fixtures Data'!$J$4:$J$1000,0)))
The values in
row 6 should be:
[TABLE="width: 540"]
<tbody>[TR]
[TD="class: xl80, width: 64, align: right"]1[/TD]
[TD="class: xl82, width: 104, align: right"]10/09/2017[/TD]
[TD="class: xl78, width: 5"][/TD]
[TD="class: xl79, width: 117"]Bandon[/TD]
[TD="class: xl79, width: 64, align: right"]1[/TD]
[TD="class: xl81, width: 5"][/TD]
[TD="class: xl79, width: 117"]Milford[/TD]
[TD="class: xl79, width: 64, align: right"]2[/TD]
[/TR]
</tbody>[/TABLE]
Copy/paste (or drag)
A6:I6 down the rows and should match table below
The values now look like this:
[TABLE="width: 549"]
<tbody>[TR]
[TD="align: right"]1[/TD]
[TD="align: right"]10/09/2017[/TD]
[TD][/TD]
[TD]Bandon[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD]Milford[/TD]
[TD="align: right"]2[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]2[/TD]
[TD="align: right"]12/09/2017[/TD]
[TD][/TD]
[TD]Milford[/TD]
[TD="align: right"]1
[/TD]
[TD][/TD]
[TD]Bandon[/TD]
[TD="align: right"]4
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]3[/TD]
[TD="align: center"]#N/A[/TD]
[TD][/TD]
[TD="align: center"]#N/A[/TD]
[TD="align: center"]#N/A[/TD]
[TD][/TD]
[TD="align: center"]#N/A[/TD]
[TD="align: center"]#N/A[/TD]
[TD][/TD]
[/TR]
[TR]
[TD="align: right"]4[/TD]
[TD="align: center"]#N/A[/TD]
[TD][/TD]
[TD="align: center"]#N/A[/TD]
[TD="align: center"]#N/A[/TD]
[TD][/TD]
[TD="align: center"]#N/A[/TD]
[TD="align: center"]#N/A[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
N/A values will be replaced with proper values when you add more data into Sheet "
Fixtures Data"