BrendanDixon
Board Regular
- Joined
- Mar 7, 2010
- Messages
- 174
- Office Version
- 365
- 2019
- Platform
- Windows
Hi all,
I have a workbook with 400 sheets named "1", "2", "3" etc to "400"
In cell C1 of each sheet I want it to show the values of cells B3 to B403 in a sheet called index.
I have written this code but cannot seem to get it right to work.
Can anyone tell me what is wrong with this code and how can I fix it.
I have a workbook with 400 sheets named "1", "2", "3" etc to "400"
In cell C1 of each sheet I want it to show the values of cells B3 to B403 in a sheet called index.
I have written this code but cannot seem to get it right to work.
Code:
Sub test3()
Dim I As Long
For I = 2 To 400
Sheets(I).Select
Range("C1").Select
ActiveCell.FormulaR1C1 = ("=Index!B" & (I) + 2)
Next I
End Sub