+ Reply to Thread
Results 1 to 8 of 8

Sum Index/Match results across multiple sheets

  1. #1
    Registered User
    Join Date
    01-10-2016
    Location
    Wales
    MS-Off Ver
    2010
    Posts
    3

    Sum Index/Match results across multiple sheets

    Hi,

    I'm trying to do what I imagine is a fairly common task and summarise predicted staff costs across a number of jobs on a weekly basis.
    The job forecasts are in individual sheets in a standard format, with w/e dates in cells D31:D136, and staff names running horizontally in cells E9:AZ9.
    Cells E31:AZ136 then contain the weekly cost per staff member.

    I have a summary tab where I have the same w/e dates, and all staff names along the top, and am trying to total the weekly cost per staff member across all jobs. Where Im struggling is that not all staff work on each job, and some jobs may be dormant so do not have any staff/cost details entered. I've defined the job list in a named range ("SCHEMES") to enable an INDIRECT function in the formula, but cant get my head around how to write it so that a) it keeps looking past the first scheme, and b) doesn't stop if it returns an error because there's no staff/scheme.

    I've attached a simplified example workbook and if anyone can help I'd be grateful!!

    Cheers
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: Sum Index/Match results across multiple sheets

    Hi there. Two things to do. Change the definition of the Named Range to:
    =OFFSET('Scheme List'!$C$2,,,SUMPRODUCT(--(LEN('Scheme List'!$C$2:$C$100)>0)))

    this makes it dynamic, expanding as required (to a maximum of 99 - set by $C$100, change if needed).

    and this in Summary, B6, copied across and down:
    =SUMPRODUCT(SUM(INDIRECT("'"&SCHEMES&"'!"&SUBSTITUTE(ADDRESS(1,COLUMN(E:E),4),1,"")&ROWS($1:31))))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Sum Index/Match results across multiple sheets

    As the names and dates are in the same order on the individual job sheets and summary sheet, at least in your attachment, you really don't need to worry about looking up just relative position.
    Try this formula, pasted into Staff Summary!B6, copied across and double clicked down:
    Please Login or Register  to view this content.
    Let me know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Sum Index/Match results across multiple sheets

    Further to JeteMc's post:

    If you add sheets named "First" and "Last" at the beginning and end of your data sheets then the formula becomes

    =SUM(First:Last!E31)

    so you can add/delete sheets with no change to the formulae.

  5. #5
    Registered User
    Join Date
    01-10-2016
    Location
    Wales
    MS-Off Ver
    2010
    Posts
    3

    Re: Sum Index/Match results across multiple sheets

    Thanks for the replies. I've realised my example workbook wasn't the best...!

    Staff vary from job to job, as can the order they are listed in on different tabs, so the formula needs to look up the staff name from the Summary sheet.

    Revised example attached.Test Resource 2.xlsx

    Thanks

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,535

    Re: Sum Index/Match results across multiple sheets

    Glen may be able to modify his formula to give you those results. I have fiddled with mine, tried to add some functionality by modifying it as an array formula, with no success. I would offer Power Pivot as a something that you may want to look in to, unfortunately my copy doesn't work (possibly due to the age of my computer).

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Sum Index/Match results across multiple sheets

    I have searched everywhere and I cannot find an example of the solution to your problem You can use individual SUMPRODUCTS i.e. Sheet by sheet and sum these

    (SUMPRODUCT (sheett1 ...) + SUMPRODUCT (Sheet2 ) .....

    but there does not appear to a way of using INDIRECT when the ranges include both rows (dates/amount) and columns (Staff).

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Sum Index/Match results across multiple sheets

    Here is a VBA-based solution.

    Please Login or Register  to view this content.

    Note: I removed formulas from "Design" column in "Scheme List" tab (needed blanks to check end of entries!)
    Attached Files Attached Files

+ 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] Sum of multiple index/match results
    By kawaik in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-25-2015, 10:03 PM
  2. How to row multiple results from multiple sheets using INDEX/MATCH.
    By ljprodigy18 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-25-2015, 06:32 PM
  3. Index Match with multiple results
    By pitterpatton in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 04-10-2014, 10:41 PM
  4. [SOLVED] Index, Match, Multiple Results
    By ecorf in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-28-2013, 11:37 AM
  5. Index/Match with multiple results
    By amcghee1 in forum Excel General
    Replies: 4
    Last Post: 10-18-2012, 12:15 PM
  6. Need help with Index + Match Multiple Results
    By xenohadden in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-11-2012, 05:00 PM
  7. Index and Match and multiple results
    By mike2bf in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-06-2008, 04:10 PM

Tags for this Thread

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