how do I fill series on different sheets

W

Wayne Palmer

In excel I want to fill a series of numbers across different sheets in a
workbook.i.e. in sheet 1 cell C3 i want 816500-002 and in sheet 2 cell C3 I
want 816500-003 and so on, how do you do it, can it be done, please help.

Wayne.
 
G

Gord Dibben

Sub String_Increment()
Dim myStr As String
Dim iCtr As Long
myStr = "816500 - 00"
For iCtr = 1 To ActiveWorkbook.Worksheets.Count
With Worksheets(iCtr).Range("C3")
.Value = myStr & iCtr + 1
End With
Next iCtr
End Sub


Gord Dibben MS Excel MVP
 
D

Don Guillett

Sub fillinsheets()
For i = 1 To Sheets.Count
Sheets(i).Range("c3").Value = "816500-00" & i + 1
Next i
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