ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Linking added sheets (https://www.excelbanter.com/excel-programming/427911-linking-added-sheets.html)

Noepie

Linking added sheets
 
Hello, I have a file with two ws: Scoreform and Results. The Scoreformws is a
breakdown of the scores a contestant can get on several parts. The Resultsws
shows the overall score of all contestants and which is a cell from
Scoreformws. With a simple macro the Scoreformws can be copied as much as
there contestants in every game. The added Scoreformws are numbered. What I
have to do manually right now is to connect the endscores of every contestant
in the Resultsws by linking the cells from all Scoreformws with the Resultws.
I would like to achieve this automatically. Can anyone help on this?

Thank you very much.

Noepie

AltaEgo

Linking added sheets
 
Hi Noepie

I presume you workbook will end up with one results sheet and many
scoreforms. If so, its a matter of looping through all worksheets, copying
the contestant details and score to your results sheet. In the loop, you
need to exclude from the copy process any non-scoreform sheets. If results
is the only sheet that is not a scoresheet, you code will look something
like:

i = 'set start row in results

For each ws in Worksheets
If ucase( ws.name) < "RESULTS" Then
'copy contestant name to results
' example Worksheets("Results").Range("A" & i) = ws.Range("A1")
'add and copy results to Worksheets("Results").Range("B" & i)
' example Worksheets("Results").Range("B" & i) = ws.Range("B10")
i = i+1 ' increment the row
end if
Next WS

If you need more help, someone else may respond to your further request
while I catch up on some sleep!


--
Steve

"Noepie" wrote in message
...
Hello, I have a file with two ws: Scoreform and Results. The Scoreformws
is a
breakdown of the scores a contestant can get on several parts. The
Resultsws
shows the overall score of all contestants and which is a cell from
Scoreformws. With a simple macro the Scoreformws can be copied as much as
there contestants in every game. The added Scoreformws are numbered. What
I
have to do manually right now is to connect the endscores of every
contestant
in the Resultsws by linking the cells from all Scoreformws with the
Resultws.
I would like to achieve this automatically. Can anyone help on this?

Thank you very much.

Noepie




All times are GMT +1. The time now is 08:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com