+ Reply to Thread
Results 1 to 7 of 7

Sum values from table based on list returned from array

  1. #1
    Forum Contributor
    Join Date
    03-30-2016
    Location
    Gillette, WY
    MS-Off Ver
    Office 365
    Posts
    230

    Sum values from table based on list returned from array

    I have an array formula that returns a list of areas scheduled for service for a given week number. I need a formula to evaluate that list against a table that provides man-hours per area, acres per area, etc and sums these values for that week. Currently I am using several large arrays that do this already but I need a more efficient method. I have tried combinations of SUMIF, INDEX/MATCH and OFFSET but the formulas will only evaluate the first area on the list and not the entire array for that week. I've attached a simplified spreadsheet for reference, thanks:
    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 2406
    Posts
    44,662

    Re: Sum values from table based on list returned from array

    Some indication of what results you expect and where you expect them to be would be helpful. All I can see is a mass of numbers.
    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

  3. #3
    Forum Contributor
    Join Date
    03-30-2016
    Location
    Gillette, WY
    MS-Off Ver
    Office 365
    Posts
    230

    Re: Sum values from table based on list returned from array

    Sorry, the results of the formula would appear in rows 40 and 41 of the example spreadsheet. The result of "Sum of Manhours per Service" is the sum of all values in column N corresponding to the area name in column L of the data table. Likewise, the result of "Sum of Acres" is the sum of all values in column O. I've updated the example sheet with expected values in rows 40 and 41.

    Also, the lists in columns B:J for each week are dynamic and will change based on user input in other areas of the spreadsheet.
    Attached Files Attached Files
    Last edited by TFiske; 11-07-2016 at 01:26 PM.

  4. #4
    Forum Contributor
    Join Date
    03-30-2016
    Location
    Gillette, WY
    MS-Off Ver
    Office 365
    Posts
    230
    Quote Originally Posted by Glenn Kennedy View Post
    Some indication of what results you expect and where you expect them to be would be helpful. All I can see is a mass of numbers.
    The results woild appear in rows 40 and 41. I updated the example sheet in my thread reply to show expected values. Thanks.

  5. #5
    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
    30,684

    Re: Sum values from table based on list returned from array

    VBA UDF:

    Please Login or Register  to view this content.
    =get_total(B$2:B$39,1) .. Manhours


    =get_total(B$2:B$39,2) ....Acres
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    03-30-2016
    Location
    Gillette, WY
    MS-Off Ver
    Office 365
    Posts
    230

    Re: Sum values from table based on list returned from array

    Thanks, is there a solution that does not use VBA?

  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
    30,684

    Re: Sum values from table based on list returned from array

    I am sure there is but I have been unable to devise one!!

+ 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] listing array values in a dynamic list based on 2 criteria from ranges
    By lkeltner in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-14-2016, 01:45 PM
  2. Macro to report how many values are returned in a pivot table
    By juliettelam in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-15-2014, 11:36 AM
  3. Replies: 0
    Last Post: 06-04-2014, 10:08 AM
  4. Formula based on value returned from drop down list
    By westhamm in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-21-2014, 01:41 PM
  5. Create List of Variables based on Unique Values in an Array
    By jmartineau in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-05-2013, 06:02 PM
  6. Replies: 9
    Last Post: 09-13-2013, 10:16 PM
  7. How to get a list of only those formula values that are returned true
    By GijsbertAnthony in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-02-2010, 11:41 AM

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