I am giving another try more explicit

dan_bucharest

New Member
Joined
Jul 13, 2009
Messages
20
Ok. We have a set of data like this:
Excel Workbook
ABCD
1player164player2
2player356player4
3player516player6
4player706player8
5player946player10
6player1163player12
7player1362player14
8player1536player16
AllPlayers


There are 16 sheets named player1, player2 etc. Example player1.
Excel Workbook
ABCDE
1
2player1
3
4
5
6
7
8
9
player1


Then when first round is played the new round is from left players. Note that player1 maybe is in column D not only in column A.
Excel Workbook
ABCD
11player546player1
12player726player5
13player361player11
14player1360player16
AllPlayers


The problem is this. In cell A4 from sheet player1, we ask excel to search data in cell C2 from sheet player1 (the data is player1 and i think that cell C2 must be text) in sheet AllPlayers in A1:D8 range. If it find the data we ask excel to put this data (what is in cell C2=player1) in cell A4 and in cell B4 and C4 the score and in D4 the opponent. BUT IF IT NOT FIND IT THEN IT LOOK IN A1:A8 RANGE FROM SHEET ALLPLAYERS, SEARCH FOR DATA AND PUTS IN CELL C4 THE DATA AND IN C1, C2 AND C3 THE OTHER DATA.
Hope i make myself understood.

When new games is played like this:
Excel Workbook
ABCD
11player546player1
12player726player5
13player361player11
14player1360player16
AllPlayers


then in sheet player1 in cell A5 to D5 the functions must be again entered to make another result.
Excel Workbook
ABCD
1
2player1
3
4player164player2
5player546player1
6
player1
 
It works only a litle bit. This is the message
Runtime error 9
Subscript out of range

Then debug
Set ws = Sheets(c.Offset(, 3).Value)
 
Upvote 0

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
End then in player1 sheet it puts 5 or 6 times the same game player1 vs player2 with same score. Is there a way to put only formulas because my professor said only formulas, we did not rich this vba code in our material.
 
Upvote 0
if you do not have ties

Excel Workbook
ABCDEFGHI
1player164player20.8267516
2player356player40.596785
3player516player60.7508083
4player706player80.375157
5player946player100.4718124
6player1163player120.5257631
7player1362player140.1282952
8player1536player160.2646338
9
10
11player1146player80.1790634
12player1026player10.7499472
13player661player40.2819731
14player1360player160.0610263
15
16
17player1365player8
18player136player6
19
20
21player13player6
Sheet2
Excel Workbook
ABCD
2player1
3
4player164player2
5player516player6
6player946player10
Sheet3
 
Upvote 0
dan_bucharest,



Is there a way to put only formulas because my professor said only formulas, we did not rich this vba code in our material.




If this is a homework assignment, you should be asking your professor for assistance, or do some research, or ask for help/guidance, but, do not ask us to write the code for you.
 
Upvote 0

Forum statistics

Threads
1,214,626
Messages
6,120,602
Members
448,974
Latest member
ChristineC

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