+ Reply to Thread
Results 1 to 5 of 5

Sumif And countif combined function

  1. #1
    Registered User
    Join Date
    10-19-2012
    Location
    York
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    59

    Sumif And countif combined function

    Hi

    I need to come up with a way to sum the total value (col G o J) where the volume (K to N) is greater than the thresholds in A & B,

    if the threshold isnt met, i need to ignore the value, ie row 7, it will only sum cells H7 & N7

    thresholds values volumes
    From To turnover 13014 PREMIER 3928.75 3623.27 3697.11 3135.27 471 447 454 378
    100 149 13132 PREMIER 765.49 1015.74 899.38 926.16 178 172 175 161
    150 199 13187 CONTRACT 953.88 1141.26 1018.14 855.76 104 110 105 101
    200 249 13582 PREMIER 5765.43 5496.41 6344.16 5971.24 1026 1019 989 1131
    250 299 14134 PREMIER 2284.81 2262.05 2354.17 2129.86 283 287 291 279
    300 399 14348 PREMIER 2609.31 2861.73 2559.94 2564 292 306 268 306

    thanks in advance!!!!
    Adi

    thanks
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sumif And countif combined function

    SUMIF() will sum all the values in ONE column where the values in another column meet ONE criteria.

    SUMIFS() will sum all the values in ONE column where the values in other columns meet criteria set for each column, as many criteria as you wish can be set.

    Try using SUMIFS.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Sumif And countif combined function

    hi Adi. you mentioned Column K to N must be greater than A & B. did you meant within? if it's greater than B, it's definitely greater than A, from what you illustrated. you could do to help us understand better is to manually key in what you hope to see in Column C. in C3 for eg could be a manual:
    =G4+H4+I4+J4

    my guess is this in C3:
    =SUMIFS($G$2:$J$7,$K$2:$N$7,">="&A3,$K$2:$N$7,"<="&B3)

    or if you're still using Excel 2003 like your profile stated:
    =SUMPRODUCT($G$2:$J$7,($K$2:$N$7>=A3)*($K$2:$N$7<=B3))

    it sums up G:J when K:N is within A:B

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    10-19-2012
    Location
    York
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    59

    Re: Sumif And countif combined function

    Hi
    thanks all, to clarify it should sum if the quantity is between the two thresholds, apolgies i was typing in a rush to get a fix in place for work for an urgent piece of work. The example was a snapshot of a bigger table, 65 different thresholds and 13 weeks of sales data!

    i'm on 2010, luckily, sumproduct is one that i very rarely use, something i plan to rectify!

    i did get round it using 13 nested if's and as i needed a quick solution (messy but it did the trick), but going forward to have a solution that i can use again would be a major time saver,

    thanks
    ADi

  5. #5
    Registered User
    Join Date
    10-19-2012
    Location
    York
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    59

    Re: Sumif And countif combined function

    Hi

    Just ran the sumifs across the full data set, and it sorted, one to remember for next time.

    thanks All

+ 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. Countif & sumif combined required to solve answer - please help
    By ACLARKE in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-16-2013, 05:13 AM
  2. How do I add a countif, averageif and sumif function
    By susiesc in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-29-2013, 12:11 AM
  3. [SOLVED] Countif function combined with conditional formatting
    By molson1973 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-30-2012, 07:13 PM
  4. The SUMIF & COUNTIF Function
    By ugaskidawg in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-07-2008, 09:30 AM
  5. countif function or sumif
    By tipuser in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-08-2007, 12:51 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