+ Reply to Thread
Results 1 to 11 of 11

array formula - sum if (with two or more conditions)

  1. #1
    Registered User
    Join Date
    09-23-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    39

    array formula - sum if (with two or more conditions)

    Anybody know, how to write array formula to sum apples john and adrian? I know how to write formula to sum one of them but no both.
    1.png
    Last edited by radek225; 09-24-2015 at 02:38 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: array formula

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title go to your first post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: array formula

    Try =sumif(e:e,"John")+sumif(e:e,"Adrien")
    Last edited by Sam Capricci; 09-24-2015 at 02:47 PM.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: array formula - sum if (with two or more conditions)

    Here try this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Also, it would be nice if next time you would upload example WORKBOOK rather than picture
    so we don't need to type data that you already have.

  5. #5
    Registered User
    Join Date
    09-23-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    39

    Re: array formula - sum if (with two or more conditions)

    Thx guys!!!

  6. #6
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: array formula - sum if (with two or more conditions)

    I had a medical procedure done earlier and now that i reread mine, it doesn't even make sense.
    should be =sumif(d:d,"John",e:e)+sumif(d:d,"Adrien",e:e)
    thankfully someone who was paying attention gave you a formula that worked.
    this should also work... =SUM(SUMIF(d:d,{"john","adrien"},e:e))

  7. #7
    Registered User
    Join Date
    09-23-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    39

    Re: array formula - sum if (with two or more conditions)

    {=SUM(IF(D18:D29={"john"\"adrien"};E18:E29;0))}

  8. #8
    Registered User
    Join Date
    09-23-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    39

    Re: array formula - sum if (with two or more conditions)

    Quote Originally Posted by zbor View Post
    Here try this:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Also, it would be nice if next time you would upload example WORKBOOK rather than picture
    so we don't need to type data that you already have.
    What if we add another condition? Please see my attachment. I tried sum(if(and(... but it doesn't work:/
    Attached Files Attached Files

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: array formula - sum if (with two or more conditions)

    Why don't use Pivot table to be flexible instead of writting criteria in formula?
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    09-23-2015
    Location
    London, England
    MS-Off Ver
    2013
    Posts
    39

    Re: array formula - sum if (with two or more conditions)

    Quote Originally Posted by zbor View Post
    Why don't use Pivot table to be flexible instead of writting criteria in formula?
    Thx for your insight, I just want to learn array formula in complicated conditions. Your solution in sheet2 is wrong. Sum should be 6 - because formula need to sum only where name = "john" or "adrian" and only where date = today. Could you write formula on the basis g18?

  11. #11
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: array formula - sum if (with two or more conditions)

    Didn't use today.
    Try now.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Can I make the row lookup array/range part in an array formula variable?
    By OLLY-7 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-18-2014, 09:06 AM
  2. [SOLVED] Evaluate Named Range Array formula to VBA Array
    By cmore in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 01-07-2014, 09:06 PM
  3. Array formula + Array formula with criteria that lookups a Table
    By anrichards22 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-16-2013, 11:41 AM
  4. Typing an array into a formula rather than referring to an array of cells
    By Cookstein2 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-03-2013, 12:59 PM
  5. Replace hard coded array in formula with link to input array
    By David Brown in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-08-2011, 07:45 AM
  6. Converting 3x10 array to a 1X30 array to run a Match formula
    By NBVC in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-08-2009, 07:45 AM
  7. [SOLVED] Tricky array formula issue - Using array formula on one cell, then autofilling down a range
    By aspenbordr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-27-2005, 11:05 AM

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