+ Reply to Thread
Results 1 to 7 of 7

Sum Values in Table If Criteria Exists In Another Table

  1. #1
    Registered User
    Join Date
    08-03-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Question Sum Values in Table If Criteria Exists In Another Table

    I am trying to sum the values in one table based on the existence of the criteria in another table. See the attached worksheet. I am looking at SUMIFS as a starting point but hit an issue where I cannot seem to get the current criteria value to do the lookup on the other table.

    Any thoughts?
    Attached Files Attached Files
    Last edited by colinbo; 08-04-2011 at 12:20 PM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: Sum Values in Table If Criteria Exists In Another Table

    Hello,

    you may need to insert a column in the sheet "Remaining work over time" to display the team for the task ID. Then you can use Sumifs or Sumproduct easily to sum the data.

    Insert a column after A and enter this formula

    Please Login or Register  to view this content.
    Copy down.

    Note that from row 19 onwards, the numbers are stored as text, hence the *1 in the formula to coerce them back to numeric values for the Match() function to work.

    cheers,

  3. #3
    Registered User
    Join Date
    08-03-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Sum Values in Table If Criteria Exists In Another Table

    Quote Originally Posted by teylyn View Post
    you may need to insert a column in the sheet "Remaining work over time" to display the team for the task ID
    That's what I am trying to avoid. The task type in the cube does not have the team linked to it. The secondary sheet comes from an extra view I created to do the linking at the database level. Both data sheets are actually Pivot Tables (copied into normal cells for the sake of the example).

  4. #4
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Sum Values in Table If Criteria Exists In Another Table

    Hello Colinbo,

    Try this in C2, copy down.

    =HLOOKUP(A2,'Remaining Work over Time'!$B$1:$M$23,MATCH(VLOOKUP(B2,'Team-Task Links'!$A$2:$B$18,2,0),'Remaining Work over Time'!$A$1:$A$23,0),0)

    There are 6 different Task ID for each team. This formula only return the first ID information.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  5. #5
    Registered User
    Join Date
    08-03-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Sum Values in Table If Criteria Exists In Another Table

    Quote Originally Posted by Haseeb A View Post
    Hello Colinbo,

    Try this in C2, copy down.

    =HLOOKUP(A2,'Remaining Work over Time'!$B$1:$M$23,MATCH(VLOOKUP(B2,'Team-Task Links'!$A$2:$B$18,2,0),'Remaining Work over Time'!$A$1:$A$23,0),0)

    There are 6 different Task ID for each team. This formula only return the first ID information.
    I need the sum for the team for each day though?

  6. #6
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Sum Values in Table If Criteria Exists In Another Table

    In the third sheet 'Team-Task Links' If teams are grouped, tr this,

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-03-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Sum Values in Table If Criteria Exists In Another Table

    I think there one word that best expresses the formula you threw together...

    WOW!

    Works like a charm and cuts out a whole raft of VBA so we can finally use Excel Web Access web parts with the sheet. Thanks so much!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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