+ Reply to Thread
Results 1 to 2 of 2

Auto fill references

  1. #1
    Registered User
    Join Date
    07-10-2004
    Posts
    37

    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 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.

  2. #2
    Jim Rech
    Guest

    Re: 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" <[email protected]> wrote in
    message news:[email protected]...
    >
    > 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
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1