+ Reply to Thread
Results 1 to 7 of 7

Sum of results from Index match formula

  1. #1
    Registered User
    Join Date
    06-19-2009
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    3

    Sum of results from Index match formula

    Hi all,

    I'm a relative novice with excel and I have encountered a problem that I can't seem to get past.

    I've managed to get it to find a value using the formula below, which is correct but does not show an accumulative figure when the criteria is met again further down the index area in spreadsheet 1.


    The formula that I have at the moment is;

    {=INDEX(sheet1!C:C,MATCH(sheet2!B325,IF(sheet1!A:A=sheet2!A325,sheet1!B:B),0))}

    Which returns the first value it finds matching the criteria, but I would like it to add the first value it finds to the second and so on.

    Please help me.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Sum of results from Index match formula

    Use a SUMPROUCT pehaps ?

    =SUMPRODUCT(--(Sheet1!$A$:A$100=Sheet2!A325),--(Sheet1!$B$1:$B$100=Sheet2!B325),Sheet1!$C$1:$C$100)

    Note i altered the ranges to rows 1:100 -- pre XL2007 you can't use entire column references in Sumproduct and you should keep ranges to a minimum else performance will be affected, moreover if you have XL2007 you can use SUMIFS which is preferable to Sumproduct.

    =SUMIFS(Sheet1!$C$1:$C$100,Sheet1!$A$1:$A$100,Sheet2!A325,Sheet1!$B$1:$B$100,Sheet2!B325)

    Alternatively think of using a Pivot Table...

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sum of results from Index match formula

    This should work

    =Sumif(sheet1!B:B,sheet2!B325,sheet1!C:C)

    Although not to sure what you are trying to do here?

    MATCH(sheet2!B325,IF(sheet1!A:A=sheet2!A325,sheet1!B:B),0)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    06-19-2009
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Sum of results from Index match formula

    Not sure if those formula work with my example.

    Eg

    I want to match Col A and Col B in sheet1 with two criteria in sheet2. If the value in Col A and B match I would then like to have the value from Col C in sheet1. The formula I provided does that. But if the Col A and B match more than once with the two values in sheet2, it will only show the first value from Col C and ignore the rest. I would like it to add them together.

    You must try to remember that I'm a total clot.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sum of results from Index match formula

    You mean?

    =SUMPRODUCT(--(Sheet1!$A$:A$100=Sheet1!$B$1:$B$100),Sheet1!$C$1:$C$100)

  6. #6
    Registered User
    Join Date
    06-19-2009
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Sum of results from Index match formula

    sorry. Ignore that. The sumIF wins the day. Thank you very much.

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sum of results from Index match formula

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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