Copy & Paste question

Pezgordo

Board Regular
Joined
Jan 28, 2011
Messages
61
I am working on a College Football spreadsheet that currently has game-by-game statistics for all 120 FBS teams. The cells/stats for each game run from column A to column EC. There are 1442 total rows. Each row contains information such as date, name of opponent, win/loss, etc and than mostly game stats.

What I would like to do, without having to copy and paste 1442 times, is place the corresponding row of each team's opponent next to that particular game. For example, on row 25 I have all of Arizona State's information from their game vs USC. On row 96 I have all of USC's information from their game vs Arizona State. How can I copy and paste the information in row 96 to row 25 (and from row 25 to row 96) starting at column ED? Since I would like to do this for each game (row), how can I do this without copy and pasting each game separately?

Any help would be appreciated. Thank you.

Tim
 
I'm sorry Glenn but my Excel knowledge/skills is pretty rudimentary. After reviewing your example, I do get ggg in I2, but I do not understand how this retrieves the information and stats for that game. If I copy the formula over to J2 I get No Record Found.

Also, based on your example am I supposed to add a column (B) between the date (column A) and the game # (column C) when using it in my spreadsheet?

When I put the formula in as is (in my column EE after adding column B), I get the following in the date column:

<table style="width: 273px; height: 232px;" border="0" cellpadding="0" cellspacing="0"><col style="width: 62pt;" width="82"> <tbody><tr style="height: 15pt;" height="20"> <td style="height: 15pt; width: 62pt;" width="82" height="20">PAC 12</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">PAC 12</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">No record found</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">PAC 12</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">No record found</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">NON</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">PAC 12</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">PAC 12</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">PAC 12</td> </tr> <tr style="height: 15pt;" height="20"> <td style="height: 15pt;" height="20">PAC 12</td> </tr> </tbody></table>
Also, just out of curiosity, why is No Record Found in the formula? I ask because of the 1442 rows of information/stats for each team (771 total games), there will always be a record found for each opponent.

Thank you,

Tim
 
Upvote 0

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Here is an example that will copy as you wish:

Excel Workbook
ABCDEFG
1DateGame #TeamOpponentAffiliationH / AW / L
203-Sep-101AZTolNONAW
318-Sep-102AZIANONHW
425-Sep-103AZCALPAC 12HW
509-Oct-104AZORSTPAC 12HL
616-Oct-105AZWsuPAC 12AW
723-Oct-106AZUWPAC 12HW
803-Sep-1099CALAZxxxBR
918-Sep-10100CALTolyyyCS
1025-Sep-10101CALIAzzzDT
1109-Oct-10102CALORSTaaaEU
1216-Oct-10103CALWsubbbFV
1323-Oct-10104CALUWcccGW
1403-Sep-10105TolAZgggHX
1518-Sep-10106TolIAhhhIY
1625-Sep-10107TolCALiiiJZ
1709-Oct-10108IAAZmmmKAA
1816-Oct-10109IATolnnnMBB
1923-Oct-10110IACALoooNCC
2003-Sep-10111ORSTAZpppODD
2118-Sep-10112WsuAZqqqPEE
2225-Sep-10113UWAZrrrQFF
2323-Oct-10114ORSTCALsssqqfff
2403-Sep-10115WsuCALtttqqqffff
2518-Sep-10116UWCALuuuqqqqfffff
Sheet2



Excel Workbook
HIJ
1fetch record field1fetch record field2fetch record field3
2gggHX
3mmmKAA
4xxxBR
5pppODD
Sheet2
 
Upvote 0
Success. Thanks Glenn, it worked great. I am sorry it took me so long to catch on. FYI, one minor discrepancy I noticed (and since it occurred only 4 times in 1442 games it was definitely not a problem), the formula would not work for UW vs NB (Washington vs Nebraska) or SC vs AUB (South Carolina vs Auburn). I finally figured out that the reason why it wouldn't work for those particular teams/games was because they each played each other twice during the season. Washington played Nebraska during the regular season and again in a bowl game while South Carolina played Auburn during the regular season and than again in the SEC Championship. So for those 4 games the formula did not work (4 completely unrelated games showed up).

Thanks again,

Tim
 
Upvote 0
Success. Thanks Glenn, it worked great. I am sorry it took me so long to catch on. FYI, one minor discrepancy I noticed (and since it occurred only 4 times in 1442 games it was definitely not a problem), the formula would not work for UW vs NB (Washington vs Nebraska) or SC vs AUB (South Carolina vs Auburn). I finally figured out that the reason why it wouldn't work for those particular teams/games was because they each played each other twice during the season. Washington played Nebraska during the regular season and again in a bowl game while South Carolina played Auburn during the regular season and than again in the SEC Championship. So for those 4 games the formula did not work (4 completely unrelated games showed up).

Thanks again,

Tim

It's great that it's working ( to a major degree ). :-D

As for the discrepency .... that's why I asked whether there would be one, and only one occurence of each pair in the list ... it depends on that being the case. You said that was the case too.

A quick fix is to mark the different matches by altering the team names to identify which pair of rows match each other like AZ1 and AZ2 etc etc.

If you want the formula to give a message when there is more than 1 match, just add an extra level of IF function, and do the same testing as for SUMPRODUCT being zero, but test for greater than 1.
 
Last edited:
Upvote 0
Glenn, it worked great. Yes I did say there would be only one occurrence of each pair in the list. I completely overlooked these two particular rematches. But typically there will only be one occurrence per season.

Thank you again,

Tim
 
Upvote 0

Forum statistics

Threads
1,224,564
Messages
6,179,547
Members
452,925
Latest member
duyvmex

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