Need a LOOKUP-like function to extract data from columns into new table

contra3

New Member
Joined
Apr 19, 2017
Messages
1
Wk#AHA W%H W%
1CHNPIT.577.488
1TBACHN.508.505
2TBAMIL.435.449
2CHNTBA.461.507
2KCATBA.471.424

<colgroup><col width="64" span="3" style="width:48pt"> <col width="64" span="2" style="width:48pt"> </colgroup><tbody>
</tbody>

The data looks like the above, with a few thousand rows, Wk# 1-30, 30 Teams.

I want to extract it to look like this:

TeamWk#12345678
CHN1.577.505
CHN2.461
TBA1.508
TBA2.435.507.424

<colgroup><col width="64" span="2" style="width:48pt"> <col width="64" span="8" style="width:48pt"> </colgroup><tbody>
</tbody>


So that the 1-8 column headers are simply instances of occurences of the Team and Wk# combinations, and in each cell in that row it lists the w% from the first table. Also, note that if the team is H (home) in the first dataset, the H W% is used. If the team is A (away), the A W% data is used.

There will be between 4 and 8 data points for each Team/Wk# combination, in general.

Pretty lost here. Have tried various if statements with lookups, match, etc. The only way I can make this work is to create individual tables for each Team and Wk# combination, but that results in over 1000 tables and is very cumbersome.

Thank you in advance for any direction you can provide.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.

Forum statistics

Threads
1,216,747
Messages
6,132,487
Members
449,729
Latest member
davelevnt

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