Name worksheet after function

J

Joe

I wasn't sure if I posted this correctly before, so I'm
reposting it. Sorry.

Hello,
I work for a school, and we use Excel to do our report
cards. I am trying to get it so the teachers can use
a "master sheet" to enter in all the student names with
grades, and then have one other sheet per student, using
the info from the master sheet (So if there were 20
students in the class, there would be 21 worksheets: 1
master and 20 report cards). The individual report card
sheets contain a "template" that looks like the student's
report card, and currently all the data gets manually put
in to each worksheet.

The first thing that I want to do is name the other sheets
to correspond with the students name, and the formula you
created below looks to be what I am looking for.
Unfortunetly, when I try to change the value of Range
("A1") it doesn't seem to work. I am using Range("Sheet3!
A1"), where "Sheet3" is the master sheet, and "A1" is
Student 1 on Sheet 3. Is there something different that I
should do when trying to reference a different sheet?

Also, and we can get to this question later if that's
easier, I would like to be able to copy a sheet that has
references to the master sheet, and have it apply to the
next sheet that is created, but for the next student.
Example is if I have the "Reading" section of the student
sheet taking the value from the master sheet using the
formula ='Sheet3!'B4, is there a way that I can make the
copy automatically use the value 'Sheet3!'B5, which would
be the next "Reading" grade for the next student on the
list?

Sorry if I was a little long winded, and I appreciate any
help you can give to me.

Thanks,

Joe
-----Original Message-----
Subject: Re: Function to name a worksheet after a cell?
From: "Bob Phillips said:
Private Sub Worksheet_Change(ByVal Target As Range)

Application.EnableEvents = False
On Error GoTo ws_exit:
If Not Intersect(Target, Range("A1")) Is Nothing Then
ActiveSheet.Name = Target.Value
End If

ws_exit:
Application.EnableEvents = True
End Sub

..
 

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