Sequential names on Sequential pages

G

Guest

I'm trying to name the cells on sequential pages with sequential names:

Page "1", cell "A5" is named "house1"
Page "2", cell "A5" is named "house2"
Page "3", cell "A5" is named "house3"
.. . . and so on . . . .

Is there a way I can do this quickly with out going to each cell on each
page and naming them individually?
 
G

Guest

Someone may have a simpler answer, but this short macro seems to do it:

Sub InstTxt()

Dim ShtNum As Byte
Dim Cntr As Byte
ShtNum = Worksheets.Count

For Cntr = 1 To ShtNum
Worksheets(Cntr).Select
Range("A5").Value = "house" & Cntr
Next Cntr

End Sub

You can put it into your file by pressing Alt+F11.
Then, choose Insert | Module
Copy and Paste

tj
 
G

Guest

Forgot to mention, you may have to adjsut your Macro Security to Medium to
run this macro in the future.
Tools | Macro, Security
tj
 

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