+ Reply to Thread
Results 1 to 4 of 4

sumif inside a sumproduct!!

  1. #1
    Registered User
    Join Date
    05-01-2012
    Location
    Doha, Qatar
    MS-Off Ver
    Excel 2007
    Posts
    13

    Question sumif inside a sumproduct!!

    My original formula was:

    =SUMIF('Delivered Material Data'!E2:E10000, Report!C49, 'Delivered Material Data'!F2:F10000)

    But I wanted to add only the cells that are within a specific date range, so I did this:

    =SUMPRODUCT(('Delivered Material Data'!D2:D10000>=Report!B6)*('Delivered Material Data'!D2:D10000<=Report!B7)*(SUMIF('Delivered Material Data'!E2:E10000, Report!C49, 'Delivered Material Data'!F2:F10000)))

    The result I got was totaly wrong, so what is it that I'm not getting?

    Report: sheet1
    Delivered Material Data: sheet2
    B6: start date in sheet1
    B7: end date in sheet1
    Delivered Material Data D2:D10000 : the dates in sheet2
    Delivered Material Data F2:F10000 : the values to add in sheet2
    Delivered Material Data E2:E10000 : the name to match in sheet2
    C49: string in sheet1

    Please help

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: sumif inside a sumproduct!!

    Hi

    Something like this, maybe?

    =SUMPRODUCT(('Delivered Material Data'!D2:D10000>=Report!B6)*('Delivered Material Data'!D2:D10000<=Report!B7)*('Delivered Material Data'!E2:E10000=Report!C49)*('Delivered Material Data'!F2:F10000))))

    Or else, pls, upload a small sample workbook.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  3. #3
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: sumif inside a sumproduct!!

    Try this instead:

    =SUMPRODUCT(('Delivered Material Data'!D2:D10000>=Report!B6)*('Delivered Material Data'!D2:D10000<=Report!B7)*('Delivered Material Data'!E2:E10000=Report!C49),'Delivered Material Data'!F2:F10000)
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  4. #4
    Registered User
    Join Date
    05-01-2012
    Location
    Doha, Qatar
    MS-Off Ver
    Excel 2007
    Posts
    13

    Re: sumif inside a sumproduct!!

    Thank you guys for taking the time to help me. Its working great now

+ 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