+ Reply to Thread
Results 1 to 12 of 12

referencing multiple sheets and sum

Hybrid View

  1. #1
    Registered User
    Join Date
    03-09-2012
    Location
    china
    MS-Off Ver
    Excel 2007
    Posts
    16

    referencing multiple sheets and sum

    hello

    there are 4 sheets in workbook.

    sheet name is 3-12, 3-13, 3-14, 3-17.

    that 3-15, 3-16 is not because of holidays.
    but, i want to display in 3-17 sheet sum of A1 cell from 3-12 sheet to 3-16 sheet.

    nearly, =SUM('3-12:3-16'!A1)

    =SUMPRODUCT(N(INDIRECT("'3-"&ROW(INDIRECT("12:"&RIGHT(A1,2)-3)) &"'!A6")))
    is well work.. but

    =SUMPRODUCT(N(INDIRECT("'3-"&ROW(INDIRECT("12:"&RIGHT(A1,2)-1)) &"'!A6")))
    do not work..

    i want to sum dynamic skip error value.
    namely, calculating to yesterday(3-16) from first day(3-12)...

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: referencing multiple sheets and sum

    If you want to use that formula construct, you'll need to create those missing sheets. With no data in them, they are harmless. And you can leave them in the correct order in the workbook, then hide them.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    03-09-2012
    Location
    china
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: referencing multiple sheets and sum

    thank you but, there is not adding dummy sheets.

    i want to construct formula considered without sheets using indirect function.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: referencing multiple sheets and sum

    If you use the indirect method to reference a non-existent sheet, the formula will break.

  5. #5
    Registered User
    Join Date
    03-09-2012
    Location
    china
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: referencing multiple sheets and sum

    yes,,,
    at any rate,, can I work with any function?

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: referencing multiple sheets and sum

    I apologize if my answers were misleading implying alternate methods. 3D referencing across multiple sheets works in Excel exactly as you know it does, the only requirements is that you accurately name the first and the last sheet in the range to sum through. If you name a sheet that doesn't exist, either directly or indirectly, all the 3D formulas I know will break.

    The simple solution you've dismissed out of hand. Create the sheets, hide them if you must. Problem goes away.

  7. #7
    Valued Forum Contributor
    Join Date
    02-05-2013
    Location
    Jakarta, Indonesia
    MS-Off Ver
    Excel 2013
    Posts
    571

    Re: referencing multiple sheets and sum

    One way, you must have a column that contain a sheet name.

    See the attachment
    Attached Files Attached Files
    Click (*) if you received helpful response.

    Regards,
    David

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: referencing multiple sheets and sum

    SDCh, when you delete the sheet 3-16 your formula breaks, too. The OP wants a formula that has a start and end date range depicting sheet name "range", but the actual sheets themselves may not exist, thus my point that all these tricks break in that scenario.

  9. #9
    Valued Forum Contributor
    Join Date
    02-05-2013
    Location
    Jakarta, Indonesia
    MS-Off Ver
    Excel 2013
    Posts
    571

    Re: referencing multiple sheets and sum

    I admit that if the OP delete the name, it will break all the formula.

    But from my point of view:
    - The OP not have sheet that the day is holidays
    - The formula that OP write always create a list of sheet that not exist

    From that I suggest the OP has a list of sheet, if the OP want to delete or exclude some sheet so the OP must re-work the formula to be fit with the list.

  10. #10
    Registered User
    Join Date
    03-09-2012
    Location
    china
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: referencing multiple sheets and sum

    thank you, SDCh!

    I thought that, too.

    Good night, i am happy!!

  11. #11
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: referencing multiple sheets and sum

    Here's a possibility...

    Assuming this has to work in Excel 2003 as your profile indicates.

    Create this named formula:
    Goto the menu Insert>Name>Define
    Name: SheetNames
    Refers to: =GET.WORKBOOK(1)&T(NOW())
    OK out

    Create a list of the sheet names. Enter this formula in F1:

    =LOOKUP("zzz",CHOOSE({1,2},"",INDEX(MID(SheetNames,FIND("]",SheetNames)+1,255),ROWS(F$1:F1))))

    Copy down until you get blanks. If you will be adding new sheets in the future then you need to copy this formula down to enough cells that it will pickup the new sheet names as they are added. How many cells that is only you would know! For the purposes of this example let's assume you copy the formula down to F10.

    Now, enter the sheet range in cells G1:H1 that you want to get the sum of. for example, to get sum across sheets 3-12 thru 3-16:

    G1 = 3-12
    H1 = 3-16

    Then, to get the sum of cell A6 across the sheet range this formula entered in I1:

    =SUMPRODUCT(N(INDIRECT("'"&INDEX(INDEX(F1:F10,MATCH(G1,F1:F10,0)):INDEX(F1:F10,MATCH(H1,F1:F10,0)),0)&"'!A6")))

    The formula will account for sheet additions or deletions.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: referencing multiple sheets and sum

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Excel 2010: Referencing same rows & columns from multiple sheets
    By cat2005 in forum Excel General
    Replies: 14
    Last Post: 11-14-2013, 12:19 PM
  2. Copy Paste Data across Workbooks with multiple sheets & Referencing.
    By v999 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-30-2012, 09:16 AM
  3. Complex Lookup or IF Formula referencing multiple cells and sheets
    By CKD777 in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 10-24-2011, 04:43 AM
  4. Referencing from multiple sheets back to sheet1
    By troth in forum Excel General
    Replies: 6
    Last Post: 02-25-2011, 12:02 PM
  5. [SOLVED] Copying formulas referencing multiple sheets
    By JA in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-10-2006, 08:25 PM

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