+ Reply to Thread
Results 1 to 2 of 2

Linking worksheet functions and arrays - Doozie

  1. #1
    Registered User
    Join Date
    08-17-2005
    Posts
    5

    Linking worksheet functions and arrays - Doozie

    Doozie of a question - workbook, formula linking

    Hey guys,

    So I have this workbook with tons of different worksheets, with different names. I also have a summary page with summaries of the answers from these sheets.

    Is there any easy way to make the summary formulas automattically include any new worksheets that are added?

    I was thinking if I could do a list of the worksheets, then I could just tell it somehow to say

    = sum({list} for cell b56) - this calcs the sum for all the b56 cells in that list.

    I tried to do this through concatenate, but it comes out as text and errors. There seems to be no way to link to another worksheet without pyshically clicking into it (this makes it a pain, since I need to change every cell for each new sheet) Now if I could get it to just do:

    Say the worksheets to sumarize from are red,blue, green. I want to be able to list these vertically and have excel do

    sum(Red56,Blue56,Green56) and when I add Yellow to the list to just make it sum(Red56,Blue56,Green56, yellow56)

    Anyone?

  2. #2
    Henry
    Guest

    Re: Linking worksheet functions and arrays - Doozie

    gsimmons2005,

    You can use a macro to do this.

    Sub mysub()

    Dim ws As Worksheet

    'Set summary values to nothing before you start

    Sheets("Summary").Range("B56").Value = ""
    Sheets("Summary").Range("C56").Value = ""

    'Loop through each worksheet in the workbook
    For Each ws In ActiveWorkbook
    'You don't want to add the summary figure to itself so ignore the sheet
    named "Summary"
    If ws.Name <> "Summary" Then
    'Add this sheet's value to the summary sheet
    Sheets("Summary").Range("B56").Value = _
    Sheets("Summary").Range("B56").Value + _
    ws.Range("B56").Value

    Sheets("Summary").Range("C56").Value = _
    Sheets("Summary").Range("C56").Value + _
    ws.Range("C56").Value

    End If

    'Next sheet
    Next ws

    'Done
    End Sub


    "gsimmons2005" <[email protected]>
    wrote in message
    news:[email protected]...
    >
    > Doozie of a question - workbook, formula linking
    >
    > Hey guys,
    >
    > So I have this workbook with tons of different worksheets, with
    > different names. I also have a summary page with summaries of the
    > answers from these sheets.
    >
    > Is there any easy way to make the summary formulas automattically
    > include any new worksheets that are added?
    >
    > I was thinking if I could do a list of the worksheets, then I could
    > just tell it somehow to say
    >
    > = sum({list} for cell b56) - this calcs the sum for all the b56 cells
    > in that list.
    >
    > I tried to do this through concatenate, but it comes out as text and
    > errors. There seems to be no way to link to another worksheet without
    > pyshically clicking into it (this makes it a pain, since I need to
    > change every cell for each new sheet) Now if I could get it to just
    > do:
    >
    > Say the worksheets to sumarize from are red,blue, green. I want to be
    > able to list these vertically and have excel do
    >
    > sum(Red56,Blue56,Green56) and when I add Yellow to the list to just
    > make it sum(Red56,Blue56,Green56, yellow56)
    >
    > Anyone?
    >
    >
    > --
    > gsimmons2005
    > ------------------------------------------------------------------------
    > gsimmons2005's Profile:
    > http://www.excelforum.com/member.php...o&userid=26385
    > View this thread: http://www.excelforum.com/showthread...hreadid=396646
    >




+ 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