Return Column name from results in grid

ThisDave

New Member
Joined
May 8, 2018
Messages
1
Hi, I hope yo can help

I've a grid with home team on the y axis and away team on the x. I've each fixture where the teams meet within the grid (so Arsenal v Leicester = 1, Leicester v Arsenal = 31 e.g.)

[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 482"]
<colgroup><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD][/TD]
[TD]Arsenal[/TD]
[TD]Bournemouth[/TD]
[TD]Brighton[/TD]
[TD]Burnley[/TD]
[TD]Chelsea[/TD]
[/TR]
[TR]
[TD]Arsenal[/TD]
[TD] [/TD]
[TD="align: right"]4[/TD]
[TD="align: right"]7[/TD]
[TD="align: right"]37[/TD]
[TD="align: right"]22[/TD]
[/TR]
[TR]
[TD]Bournemouth[/TD]
[TD="align: right"]23[/TD]
[TD][/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]10[/TD]
[/TR]
[TR]
[TD]Brighton[/TD]
[TD="align: right"]29[/TD]
[TD="align: right"]22[/TD]
[TD] [/TD]
[TD="align: right"]18[/TD]
[TD="align: right"]24[/TD]
[/TR]
[TR]
[TD]Burnley[/TD]
[TD="align: right"]13[/TD]
[TD="align: right"]38[/TD]
[TD="align: right"]36[/TD]
[TD][/TD]
[TD="align: right"]31[/TD]
[/TR]
[TR]
[TD]Chelsea[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]25[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]1[/TD]
[TD] [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

I'd like a formula which, if I input "Arsenal" in cell b1 and "1" in a2, it will return "Leicester" in b2.

**
I have tried combining an if function with V & H Lookups, or index or match functions, but to no avail.

Obviously each team plays 38 fixtures, and meets each opponent twice.

Essentially I want to replace the Away teams on the x axis with the fixture number, and subsequently the fixture numbers within the grid, with the opponents to make later referencing easier.
[TABLE="width: 500"]
<tbody>[TR]
[TD][TABLE="width: 482"]
<colgroup><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Home\/ Away>[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD]4[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Arsenal[/TD]
[TD] Leicester[/TD]
[TD="align: right"]Stoke[/TD]
[TD="align: right"]Liverpool[/TD]
[TD="align: right"]Bournemouth[/TD]
[TD="align: right"]Chelsea[/TD]
[/TR]
[TR]
[TD]Bournemouth[/TD]
[TD="align: right"][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]Brighton[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]Burnley[/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD="align: right"][/TD]
[TD][/TD]
[TD="align: right"][/TD]
[/TR]
[TR]
[TD]Chelsea[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]


Any help is appreciated

**( I mean, eventually, I'm aiming to input "1" into a cell and have each of the fixtures displayed across a range, but I reckon I can sort that afterwards)
[TABLE="width: 500"]
<tbody>[TR]
[TD]Fixture[/TD]
[TD]1[/TD]
[TD] [/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Home[/TD]
[TD][/TD]
[TD][/TD]
[TD]Away[/TD]
[/TR]
[TR]
[TD]Arsenal[/TD]
[TD][/TD]
[TD][/TD]
[TD]Leicester[/TD]
[/TR]
[TR]
[TD]Brighton[/TD]
[TD][/TD]
[TD][/TD]
[TD]Man Utd[/TD]
[/TR]
[TR]
[TD]Chelsea[/TD]
[TD][/TD]
[TD][/TD]
[TD]Burnley[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Forum statistics

Threads
1,223,234
Messages
6,170,891
Members
452,366
Latest member
TePunaBloke

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