+ Reply to Thread
Results 1 to 2 of 2

Sum cells that match multiple criteria -- SUMPRODUCT

  1. #1
    Registered User
    Join Date
    10-05-2009
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    76

    Sum cells that match multiple criteria -- SUMPRODUCT

    I am trying to use the SUMPRODUCT function, however I keep receiving the "#Value" error. Basically, if the two criteria are met in a row, I want a certain column to sum for those particular rows. For example if J2 and J4 both contain "MED.AM" and A2 and A4 both equal A6 then I want to sum P2 and P4. I can't seem to figure it out. Can someone please assist and explain? I hope this makes sense.

    =SUMPRODUCT(--('results(1)'!J:J="MED.AM"),--('results(1)'!A:A=Sheet1!A6),--('results(1)'!L:L))

    As usual, best forum ever and I appreciate your help!

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

    Re: Sum cells that match multiple criteria -- SUMPRODUCT

    Don't put the -- on the summing range:

    =SUMPRODUCT(--('results(1)'!J:J="MED.AM"),--('results(1)'!A:A=Sheet1!A6),'results(1)'!L:L)

    IN XL2007 it is better to use COUNTIFS

    e.g

    =SUMIFS('results(1)'!L:L,'results(1)'!J:J,"MED.AM",'results(1)'!A:A,Sheet1!A6)

    especially when dealing with large ranges.
    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.

+ 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