Hello there,
I am looking for a formula that can handle returning an index value based on header names instead of index number. This is because the data source is dynamic. The location of the index value I am looking for will vary depending on the source.
There are two reliable constants:
In this scenario, I am trying to find the value of X.
Here is my spreadsheet today:
Sheet 1: (Static)
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Team Name[/TD]
[TD]Wins[/TD]
[/TR]
[TR]
[TD]49ers[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]Cardinals[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]Rams[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]Seahawks[/TD]
[TD]X[/TD]
[/TR]
</tbody>[/TABLE]
Sheet 2: (Dynamic)
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Wins[/TD]
[TD]Losses[/TD]
[TD]Ties[/TD]
[TD]PCT[/TD]
[TD]Team Name[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]1.000[/TD]
[TD]49ers[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD].750[/TD]
[TD]Rams[/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]4[/TD]
[TD]0[/TD]
[TD].000[/TD]
[TD]Cardinals[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]3[/TD]
[TD]0[/TD]
[TD].250[/TD]
[TD]Seahawks[/TD]
[/TR]
</tbody>[/TABLE]
Here is my spreadsheet tomorrow:
Sheet 1: (Static)
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Team Name[/TD]
[TD]Wins[/TD]
[/TR]
[TR]
[TD]49ers[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]Cardinals[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]Rams[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]Seahawks[/TD]
[TD]X[/TD]
[/TR]
</tbody>[/TABLE]
Sheet 2: (Dynamic)
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Team Name[/TD]
[TD]Losses[/TD]
[TD]Wins[/TD]
[TD]PCT[/TD]
[TD]Ties[/TD]
[TD]Streak[/TD]
[/TR]
[TR]
[TD]49ers[/TD]
[TD]0[/TD]
[TD]5[/TD]
[TD]1.000[/TD]
[TD]0[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Cardinals[/TD]
[TD]5[/TD]
[TD]0[/TD]
[TD].000[/TD]
[TD]0[/TD]
[TD]-5[/TD]
[/TR]
[TR]
[TD]Seahawks[/TD]
[TD]4[/TD]
[TD]1[/TD]
[TD].200[/TD]
[TD]0[/TD]
[TD]-4[/TD]
[/TR]
[TR]
[TD]Rams[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD].600[/TD]
[TD]0[/TD]
[TD]-1[/TD]
[/TR]
</tbody>[/TABLE]
And here is the data the day after tomorrow:
Sheet 1: (Static)
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Team Name[/TD]
[TD]Wins[/TD]
[/TR]
[TR]
[TD]49ers[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]Cardinals[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]Rams[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]Seahawks[/TD]
[TD]X[/TD]
[/TR]
</tbody>[/TABLE]
Sheet 2: (Dynamic)
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Losses[/TD]
[TD]Ties[/TD]
[TD]Team Name[/TD]
[TD]Streak[/TD]
[TD]Wins[/TD]
[TD]Seed[/TD]
[TD]PCT[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]0[/TD]
[TD]Rams[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD].667[/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]0[/TD]
[TD]49ers[/TD]
[TD]6[/TD]
[TD]6[/TD]
[TD]1[/TD]
[TD]1.000[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]0[/TD]
[TD]Cardinals[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]14
[/TD]
[TD].167[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]0[/TD]
[TD]Seahawks[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]12[/TD]
[TD].333[/TD]
[/TR]
</tbody>[/TABLE]
So as you can see, the location of the data varies, as well as how many columns we are dealing with in Sheet 2. Any help with this would be greatly appreciated!
I am looking for a formula that can handle returning an index value based on header names instead of index number. This is because the data source is dynamic. The location of the index value I am looking for will vary depending on the source.
There are two reliable constants:
- Sheet 1 will remain static.
- The header names will always be the same
In this scenario, I am trying to find the value of X.
Here is my spreadsheet today:
Sheet 1: (Static)
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Team Name[/TD]
[TD]Wins[/TD]
[/TR]
[TR]
[TD]49ers[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]Cardinals[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]Rams[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]Seahawks[/TD]
[TD]X[/TD]
[/TR]
</tbody>[/TABLE]
Sheet 2: (Dynamic)
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Wins[/TD]
[TD]Losses[/TD]
[TD]Ties[/TD]
[TD]PCT[/TD]
[TD]Team Name[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]1.000[/TD]
[TD]49ers[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]1[/TD]
[TD]0[/TD]
[TD].750[/TD]
[TD]Rams[/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]4[/TD]
[TD]0[/TD]
[TD].000[/TD]
[TD]Cardinals[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]3[/TD]
[TD]0[/TD]
[TD].250[/TD]
[TD]Seahawks[/TD]
[/TR]
</tbody>[/TABLE]
Here is my spreadsheet tomorrow:
Sheet 1: (Static)
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Team Name[/TD]
[TD]Wins[/TD]
[/TR]
[TR]
[TD]49ers[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]Cardinals[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]Rams[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]Seahawks[/TD]
[TD]X[/TD]
[/TR]
</tbody>[/TABLE]
Sheet 2: (Dynamic)
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Team Name[/TD]
[TD]Losses[/TD]
[TD]Wins[/TD]
[TD]PCT[/TD]
[TD]Ties[/TD]
[TD]Streak[/TD]
[/TR]
[TR]
[TD]49ers[/TD]
[TD]0[/TD]
[TD]5[/TD]
[TD]1.000[/TD]
[TD]0[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD]Cardinals[/TD]
[TD]5[/TD]
[TD]0[/TD]
[TD].000[/TD]
[TD]0[/TD]
[TD]-5[/TD]
[/TR]
[TR]
[TD]Seahawks[/TD]
[TD]4[/TD]
[TD]1[/TD]
[TD].200[/TD]
[TD]0[/TD]
[TD]-4[/TD]
[/TR]
[TR]
[TD]Rams[/TD]
[TD]2[/TD]
[TD]3[/TD]
[TD].600[/TD]
[TD]0[/TD]
[TD]-1[/TD]
[/TR]
</tbody>[/TABLE]
And here is the data the day after tomorrow:
Sheet 1: (Static)
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Team Name[/TD]
[TD]Wins[/TD]
[/TR]
[TR]
[TD]49ers[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]Cardinals[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]Rams[/TD]
[TD]X[/TD]
[/TR]
[TR]
[TD]Seahawks[/TD]
[TD]X[/TD]
[/TR]
</tbody>[/TABLE]
Sheet 2: (Dynamic)
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Losses[/TD]
[TD]Ties[/TD]
[TD]Team Name[/TD]
[TD]Streak[/TD]
[TD]Wins[/TD]
[TD]Seed[/TD]
[TD]PCT[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]0[/TD]
[TD]Rams[/TD]
[TD]1[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD].667[/TD]
[/TR]
[TR]
[TD]0[/TD]
[TD]0[/TD]
[TD]49ers[/TD]
[TD]6[/TD]
[TD]6[/TD]
[TD]1[/TD]
[TD]1.000[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]0[/TD]
[TD]Cardinals[/TD]
[TD]1[/TD]
[TD]1[/TD]
[TD]14
[/TD]
[TD].167[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]0[/TD]
[TD]Seahawks[/TD]
[TD]1[/TD]
[TD]2[/TD]
[TD]12[/TD]
[TD].333[/TD]
[/TR]
</tbody>[/TABLE]
So as you can see, the location of the data varies, as well as how many columns we are dealing with in Sheet 2. Any help with this would be greatly appreciated!