+ Reply to Thread
Results 1 to 8 of 8

Sum if multiple conditions fit

  1. #1
    Forum Contributor Gabor's Avatar
    Join Date
    02-15-2004
    Location
    Székesfehérvár, Hungary
    MS-Off Ver
    xl2016
    Posts
    226

    Sum if multiple conditions fit

    Hi Everyone,

    I would like to have a formula in Sheet2 C33 that picks and sums entries of a table on Sheet1 based on the following :

    Sum the numbers in Sheet1!E6:E1006 (containing quantities of individual orders)
    IF
    1. the corresponding cells' entries in Sheet1!F6:F1006 (which are Required-on-Date entries,) are smaller than D31
    AND
    2. the corresponding cells' entries in Sheet1!F6:F1006 are greater or equal than C31
    AND
    3. the corresponding cells' entries in Sheet1!N6:N1006 in Not Empty

    Entry in D31 : Date, the first of Month A+1
    Entry in E31 : Date, the first of Month A

    Paraphrasing:
    Count how many parts do I have to ship per month, month by month.

    So this is to calculate a monthly shipping demand figure and auto visualize in a graph.
    The quantities and the status vary day-by-day an my desire is to have a dinamically updated graph.

    I am sure some of you have had this already.

    Cheers,
    Gabor

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    I would like to have a formula in Sheet2 C33 that picks and sums entries of a table on Sheet1 based on the following :

    Sum the numbers in Sheet1!E6:E1006 (containing quantities of individual orders)
    IF
    1. the corresponding cells' entries in Sheet1!F6:F1006 (which are Required-on-Date entries,) are smaller than D31
    AND
    2. the corresponding cells' entries in Sheet1!F6:F1006 are greater or equal than C31
    AND
    3. the corresponding cells' entries in Sheet1!N6:N1006 in Not Empty

    Entry in D31 : Date, the first of Month A+1
    Entry in E31 : Date, the first of Month A
    How about something like:

    =SUMPRODUCT((Sheet1!F6:F1006<D31)*(Sheet1!F6:F1006>=C31)*(Sheet1!N6:N1006<>"")*(Sheet1!E6:E1006))

  3. #3
    Forum Contributor Gabor's Avatar
    Join Date
    02-15-2004
    Location
    Székesfehérvár, Hungary
    MS-Off Ver
    xl2016
    Posts
    226

    Sum if

    Thanks

    I'm getting #VALUE!
    It is due to the last section, *(Sheet1!E6:E1006)) since I delete this I get the number of records that fulfil the criterias.
    But somehow it doesn't add up the values of Col E

    Gabor

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Instead of ending with:

    *(Sheet1!E6:E1006))

    Try this:

    ,(Sheet1!E6:E1006))

    If that doesn't help, can you post a zipped sheet with some test data?

  5. #5
    Valued Forum Contributor
    Join Date
    07-11-2004
    Posts
    851
    sounds like there is text in that area so the change above should fix it
    not a professional, just trying to assist.....

  6. #6
    Forum Contributor Gabor's Avatar
    Join Date
    02-15-2004
    Location
    Székesfehérvár, Hungary
    MS-Off Ver
    xl2016
    Posts
    226

    Bingo

    YOU GOT IT.

    pjoaquin and duane,

    There were a couple of text entries.
    Now the originally suggested formula WORKS PREMIUM.

    Thanks a lot, you've made my day buddies.

    Gabor

  7. #7
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,885
    Glad to hear it worked. Thanks for the feedback.

  8. #8
    Forum Contributor Gabor's Avatar
    Join Date
    02-15-2004
    Location
    Székesfehérvár, Hungary
    MS-Off Ver
    xl2016
    Posts
    226

    Barbecue

    I wish I could have you guys on a BBQ one Saturday.
    But the main thing I learned something again.
    Have fun and prosper.
    Gabor

+ 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