I do NOT understand your response. I am only familiar with Excel and its
functions. You seem to be alluding to some programmable subroutines which I
am NOT familiar with?
can you still be of assistance?
thanks,
FLKULCHAR
"Gord Dibben" wrote:
FLKulchar
Sub Number_Increment()
''increment a number in A1 across sheets
Dim mynum As Long
Dim ws As Long
mynum = 1
For ws = 1 To Worksheets.Count
With Worksheets(ws).Range("A1")
.Value = mynum - 1 + ws
'the -1 ensures first sheet A1 is 1
'change if want to start from another number
End With
Next ws
End Sub
Alternative if you want to have a formula in each A1 referring to the sheet
before as per your example.
Sub Fill_Across_Sheets()
Dim sh As Worksheet
Dim i As Integer
Dim ShName As String
For i = 2 To Worksheets.Count
ShName = Worksheets(i - 1).Name
Worksheets(i).Range("A1").Formula = "='" & ShName & "'!A1+1"
Next
End Sub
Gord Dibben Excel MVP
On Thu, 29 Sep 2005 16:03:01 -0700, FLKULCHAR
wrote:
How do you get a value within a cell to increment, by say, 1, for each and
every worksheet within my workbook?
For example, the value in sheet1 in cell A1 is 100
in sheet2, I input...= 1 + 'sheet1'!A1 in cell A1 (value now is 101)
then, in sheet 3, I input...= 1 + 'sheet2'!A1 in cell A1 (value now is 102)
then, in sheet 4, I input...= 1 + 'sheet3'!A1 in cell A1 (value now is 103)
etc.,etc.,etc.
How can I input a formula...then copy and paste it into my sheets without
having to go to each and every worksheet to input the formula??
Thank you,
FLKulchar
|