+ Reply to Thread
Results 1 to 3 of 3

Sumif?

  1. #1
    Registered User
    Join Date
    07-08-2011
    Location
    New York City
    MS-Off Ver
    Excel 2010
    Posts
    23

    Sumif?

    Hello all:

    I am working on a report where I need to SUM amounts in column H, but only those amounts whose ID (located in column A) can be found on a list in a specific sheet of the same workbook. I have 5 additional sheets with lists that contain ID's so I'll use the same piece of code to sum all of these ID's column H values that match ID's in other sheets.

    So basically steps are these:

    1. Go through column A in the active sheet and look for ID's that match ID's in specific sheet (also located in Column A).
    2. If the matching ID is found, use value from the H column of the same row and add it to the SUM.

    SUM cell is located 8 cells under the last row in column F, but that's not the problem since I already figured that part out. I am just having difficulties with creating a piece of code to SUM values from cells in column H based on the matching ID's in column A.

    Hopefully I made some sense. Let me know if you need more clarification.

    Thank you!!!
    Last edited by rainbowforest; 09-24-2011 at 02:52 PM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Sumif?

    Assuming sheet 1 and sheet 2 then try this formula

    =SUMPRODUCT(ISNUMBER(MATCH(A2:A100,Sheet2!A2:A100,0))+0,H2:H100)
    Audere est facere

  3. #3
    Registered User
    Join Date
    07-08-2011
    Location
    New York City
    MS-Off Ver
    Excel 2010
    Posts
    23

    Thumbs up Re: Sumif?

    Quote Originally Posted by daddylonglegs View Post
    Assuming sheet 1 and sheet 2 then try this formula

    =SUMPRODUCT(ISNUMBER(MATCH(A2:A100,Sheet2!A2:A100,0))+0,H2:H100)
    Works like a charm. 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)

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