ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto fill references (https://www.excelbanter.com/excel-programming/344152-auto-fill-references.html)

claytorm[_14_]

Auto fill references
 

Another question:

Main sheet has list of values in col A starting with A2, e.g.

AAL
ABF
ABG


I want to create a reference so that cell A1 in Sheet 2 of the workboo
links to A2 in the Main sheet, i.e. "AAL". A1 in Sheet 3 would link t
A3 in the Main sheet, i.e. "ABF", and so on. Given that there are 300
sheets, I don't want to do this manually. If any of you can help, I'
really appreciate it.

Bertie

--
claytor
-----------------------------------------------------------------------
claytorm's Profile: http://www.excelforum.com/member.php...fo&userid=1161
View this thread: http://www.excelforum.com/showthread.php?threadid=48024


Jim Rech

Auto fill references
 
There is no function in Excel that does this so you'd have to do it by
macro:

Sub a()
Dim Counter As Integer
For Counter = 2 To Worksheets.Count
With Worksheets(Counter)
.Cells(1).Formula = "=" & Worksheets(1).Name & "!A" & .Index
End With
Next
End Sub


--
Jim
"claytorm" wrote in
message ...

Another question:

Main sheet has list of values in col A starting with A2, e.g.

AAL
ABF
ABG


I want to create a reference so that cell A1 in Sheet 2 of the workbook
links to A2 in the Main sheet, i.e. "AAL". A1 in Sheet 3 would link to
A3 in the Main sheet, i.e. "ABF", and so on. Given that there are 300 +
sheets, I don't want to do this manually. If any of you can help, I'd
really appreciate it.

Bertie.


--
claytorm
------------------------------------------------------------------------
claytorm's Profile:
http://www.excelforum.com/member.php...o&userid=11610
View this thread: http://www.excelforum.com/showthread...hreadid=480244





All times are GMT +1. The time now is 02:40 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com