Linking added sheets

N

Noepie

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
 
A

AltaEgo

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top