Consecutive numbering

E

Esradekan

Hope someone can help.

How can I get one cell (B35) on each of 100 worksheets to number
consecutively?

TIA
Esra
 
S

Subodh

You should use VBA code for this.
As far as my knowledge goes Worksheets functions won't work.

Hope someone can help.

How can I get one cell (B35) on each of 100 worksheets to number
consecutively?

TIA
Esra




- Show quoted text -

U should use VBA code.
 
E

Esradekan

You should use VBA code for this.
As far as my knowledge goes Worksheets functions won't work.





U should use VBA code.

Thank you for the reply. Can you point me in the direction of how I
can get VBA code for this?

TIA
Esra
 
R

Roger Govier

Hi Eara

Try this

Sub Numbersheets()
Dim i As Long, ws As Worksheet
i = 1
Application.ScreenUpdating = False
For Each ws In ThisWorkbook.Sheets
ws.Range("B35") = i
i = i + 1
Next
Application.ScreenUpdating = True
End Sub

To Install
Copy code above
Alt+F11 to invoke the VB Editor
Alt+I+M to insert a new module
Paste code into White Pane that appears
Alt+F11 to return to Excel

To Use
Alt+F8 to bring up Macros
Select macro name
Run
 
E

Esradekan

Hi Eara

Try this

Sub Numbersheets()
     Dim i As Long, ws As Worksheet
     i = 1
     Application.ScreenUpdating = False
     For Each ws In ThisWorkbook.Sheets
         ws.Range("B35") = i
         i = i + 1
     Next
     Application.ScreenUpdating = True
End Sub

To Install
Copy code above
Alt+F11 to invoke the VB Editor
Alt+I+M to insert a new module
Paste code into White Pane that appears
Alt+F11 to return to Excel

To Use
Alt+F8 to bring up Macros
Select macro name
Run

--
Regards
Roger Govier





- Show quoted text -

Perfect, thank you Roger, most helpful

Esra
 

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