+ Reply to Thread
Results 1 to 5 of 5

Summary sheet

Hybrid View

  1. #1
    Registered User
    Join Date
    07-22-2009
    Location
    Quebec
    MS-Off Ver
    Excel 2007
    Posts
    11

    Summary sheet

    I have about 100 sheets in my workbook, and I want to create summary sheets which will take for example the cells A2, B4 and C6. It would then put this information in the summary sheet, each row representing a sheet.

    Is there anyway to do so, without making the link one by one for each sheet?

    Thanks a lot,

    Cope

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Summary sheet

    You can do this easily by macro. Please see the attachment for an example.

    You can edit the code if needed by hitting ALT F11 and looking on the module1 tab.

    Run the macro by hitting the GO button on the Summary tab. Note the values in the top row which correspond to the addresses that you need. You can add to this as necessary.

    Sub Test()
    RowCount = 1
    For Each Sheet In ActiveWorkbook.Sheets
        If Sheet.Name <> "Summary" Then
            RowCount = RowCount + 1
            Sheets("Summary").Cells(RowCount, 1) = Sheet.Name
            For N = 2 To Sheets("Summary").Cells(1, Columns.Count).End(xlToLeft).Column
                Sheets("Summary").Cells(RowCount, N) = Sheet.Range(Sheets("Summary").Cells(1, N))
            Next N
        End If
    Next Sheet
    End Sub
    Attached Files Attached Files
    Martin

  3. #3
    Registered User
    Join Date
    07-22-2009
    Location
    Quebec
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Summary sheet

    It worked great, but it's not what I expected. What I would prefer is not only the data but a link to the actual sheets.

    Thanks a lot for this one,

    Cope

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Summary sheet

    Try this replacement

    Sub Test()
    RowCount = 1
    For Each Sheet In ActiveWorkbook.Sheets
        If Sheet.Name <> "Summary" Then
            RowCount = RowCount + 1
            Sheets("Summary").Cells(RowCount, 1) = Sheet.Name
            For N = 2 To Sheets("Summary").Cells(1, Columns.Count).End(xlToLeft).Column
                Sheets("Summary").Cells(RowCount, N).Formula = "=" & Sheet.Name & "!" & Cells(1, N)
            Next N
        End If
    Next Sheet
    End Sub

  5. #5
    Registered User
    Join Date
    07-22-2009
    Location
    Quebec
    MS-Off Ver
    Excel 2007
    Posts
    11

    Re: Summary sheet

    Thanks a lot, this time it worked as expected.

    Thanks,

    Cope

+ 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