+ Reply to Thread
Results 1 to 5 of 5

SUMIF help

  1. #1
    Registered User
    Join Date
    11-19-2015
    Location
    USA
    MS-Off Ver
    Office 2007
    Posts
    2

    SUMIF help

    I have data similar to this

    115
    115
    121
    125
    131
    135

    If the number is less than 120 include cell contents in sum
    If the number is greater than 120 and less than 130 include the value of 120 in the sum
    If the number is greater than 130 do not include in sum

    Thus the result i am looking for would be 470.

    How can I sum this way?


    Thank you in advance.

  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
    52,957

    Re: SUMIF help

    Hi, welcome to the forum

    Try this...
    =SUMIF($A$1:$A$6,"<120")+120*COUNTIFS($A$1:$A$6,">=120",$A$1:$A$6,"<=130")

    All of your rules say greater than or less than, none said =, so I took it to be >=120 and <=130...adjust this as needed
    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 Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: SUMIF help

    Try

    =SUMIF(A1:A6,"<120",A1:A6)+120*(COUNTIFS($A$1:$A$6,">=120",$A$1:$A$6,"<=130"))

    Dang, too slow again. LOL
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    11-19-2015
    Location
    USA
    MS-Off Ver
    Office 2007
    Posts
    2

    Re: SUMIF help

    Thank you for the help, that did exactly what I needed.

  5. #5
    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
    52,957

    Re: SUMIF help

    Happy to help

    (Chemist, you reminded me of that "like a good neighbour" insurance commercial with the girl and the guy with the fishing pole...you gotta be quicker than that)

+ 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. SumIf formula or Sumif with pivottable combined question
    By mcgleeuw in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-10-2015, 01:05 PM
  2. Replies: 4
    Last Post: 12-04-2014, 02:06 PM
  3. Subtracting from the SUMIF with the difference from the SUMIF range
    By iamblue91 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-04-2014, 09:01 PM
  4. [SOLVED] Shorten SUMIF + SUMIF + SUMIF each with same reference range but different criteria???
    By HeyInKy in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-13-2014, 09:25 PM
  5. SUMIF or SUMIF's formula with multiple criteria
    By jackiemariee in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-30-2013, 06:19 PM
  6. SUMIF Question: SUMIF not blank
    By nickyg in forum Excel General
    Replies: 5
    Last Post: 11-18-2009, 10:07 PM
  7. Nested SUMIF statement or multiple SUMIF's
    By Dan27 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-17-2009, 06:55 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