+ Reply to Thread
Results 1 to 15 of 15

Conditional SUM Formulas

  1. #1
    Forum Contributor
    Join Date
    01-16-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    928

    Conditional SUM Formulas

    Can we write the formula on the cell A27 with "SUMIFS" function?


    On SUMIFS explanation it says it requires several conditions. But on syntax it says

    Criteria, Criteria Range1, Criteria

    so i think writing the formula like this but it won't work.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by zanshin777; 01-03-2016 at 11:29 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: Conditional SUM Formulas

    It actually says...
    =SUMIFS(sum-range, Criteria Range1, Criteria1.......)
    meaning...
    =SUMIFS(sum-range, Criteria Range1, Criteria1,Criteria Range2, Criteria2,Criteria Range3, Criteria3, etc)

    I am unable to see, from your file, exactly what you want Can you explain please
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,671

    Re: Conditional SUM Formulas

    =SUMIFS(Amount, DateDue,">="&DATE(2007,5,1)) works OK

    SUMIFS syntax is SUM Range, Criteria range1, Criteria1,Criteria range2, Criteria2,

    "DueDate" is Criteria1 Range

    ">="&DATE(2007,5,1) is criteria1

  4. #4
    Forum Contributor
    Join Date
    01-16-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    928

    Re: Conditional SUM Formulas

    Why isn't it written like this?


    1) ">=&DATE(2007,5,1)"

    or

    2) ">=&"DATE(2007,5,1)

  5. #5
    Forum Contributor
    Join Date
    01-16-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    928

    Re: Conditional SUM Formulas

    3) Can we write the formula on the cell A32 with SUMIFS and SUMIF?

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,408

    Re: Conditional SUM Formulas

    In the first case that would take the literal string &DATE(2007,5,1) as the value to be compared with. The second case is syntactically incorrect as you have the string ">=&" followed by the DATE function (which returns a number), and nothing to "join" them together.

    Also, see your other thread on this topic.

    Hope this helps.

    Pete

  7. #7
    Forum Contributor
    Join Date
    01-16-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    928

    Re: Conditional SUM Formulas

    Sorry, I'm confused I would have asked that question in other post.

    However the question #3 remains.
    Last edited by zanshin777; 01-03-2016 at 12:07 PM.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,044

    Re: Conditional SUM Formulas

    Quote Originally Posted by zanshin777 View Post
    Why isn't it written like this?


    1) ">=&DATE(2007,5,1)"

    or

    2) ">=&"DATE(2007,5,1)
    When you use > or < in a formula, excel treats them as text - you must wrap text in "". DATE() is a function, and (most) functions can be used just as they are. You use & co combine/join the text and function together

  9. #9
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,671

    Re: Conditional SUM Formulas

    Re question #3

    =SUM(SUMIFS(Amount,Difference,"<0",Office,{"Oregon","California"}))

    SUMIFS will create a result for each criterion i.e, Oregon then California and then we SUM the results.

  10. #10
    Forum Contributor
    Join Date
    01-16-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    928

    Re: Conditional SUM Formulas

    Who does this formula won't work for A32?

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

  11. #11
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,671

    Re: Conditional SUM Formulas

    You need two separate SUMIF as it is an OR condition. Add the Amounts if Overdue OR Office is Oregon

    =SUMIF(Difference,"<0",Amount)+SUMIF(Office,"Oregon",Amount)
    Last edited by JohnTopley; 01-04-2016 at 09:17 AM.

  12. #12
    Forum Contributor
    Join Date
    01-16-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    928

    Re: Conditional SUM Formulas

    However the result is different with that formula. (16722.45) Why?

  13. #13
    Forum Contributor
    Join Date
    01-16-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    928

    Re: Conditional SUM Formulas

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


    That formula won't work. The result is different than the original formula.



  14. #14
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,671

    Re: Conditional SUM Formulas

    Depends what you expect the formula to do: reading you comments in your workbook it is hard to determine whether you mean logical "OR" or logical "AND"

    If you want the Differences for Oregon then the above will not work: what is required is an AND condition using SUMIFS as there are 2 criteria.

  15. #15
    Forum Contributor
    Join Date
    01-16-2015
    Location
    Istanbul
    MS-Off Ver
    Office 365
    Posts
    928

    Re: Conditional SUM Formulas

    The formula on the cell A33 looks like faulty to me.

    1)"Amount" only multiplied with the cells of which Office Column is Oregon. The cells of which Difference Column <0 are skipped. Isn't it faulty?

    2)Isn't there a paranthesis next to "SUM" missing? Because after "+" there is not another "SUM".

    I think it should have been like this;

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

+ 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. Conditional formulas that can be used in conditional formatting
    By Linda-Decypher in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-10-2015, 03:22 PM
  2. Conditional Formulas?
    By lanespoli in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-21-2014, 10:28 PM
  3. [SOLVED] Conditional Formulas
    By spursrule68 in forum Excel General
    Replies: 4
    Last Post: 11-06-2012, 05:13 PM
  4. Excel 2007 : Conditional Formulas - HELP!
    By willroney in forum Excel General
    Replies: 2
    Last Post: 10-06-2010, 09:44 AM
  5. Conditional formulas help
    By J. Moore in forum Excel General
    Replies: 4
    Last Post: 07-21-2009, 04:47 PM
  6. Conditional Formulas
    By haxmania1 in forum Excel General
    Replies: 15
    Last Post: 11-17-2008, 02:52 AM
  7. conditional formulas
    By luna55 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-12-2008, 04:16 PM

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