+ Reply to Thread
Results 1 to 9 of 9

Countif range less than range

  1. #1
    Forum Contributor
    Join Date
    08-20-2012
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    184

    Countif range less than range

    Hi,

    Probably the simplest question which I just cannot figure out.

    I have a range of percentages. Say, B2:B10 and I want to Countif B2:B10 is less than Range A2:A10. (Column A is targets, B is actuals).

    I would really appreciate your help with this.

    Many thanks

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Countif range less than range

    Maybe:
    =SUMPRODUCT(--(B2:B10-A2:A10<0))
    Quang PT

  3. #3
    Forum Contributor
    Join Date
    08-20-2012
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Countif range less than range

    Thank you for this. Can I do a sumproduct based on multiple cells? ie B2,B9,B15-A2,A9,A15>0? I just get a #Value! error.

    thanks in advance

  4. #4
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Countif range less than range

    Is there another column in your data you could use to determine which rows to compare?
    Audere est facere

  5. #5
    Forum Contributor
    Join Date
    08-20-2012
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Countif range less than range

    my problem is in one column, I have a mixture of percentages and numbers. These are targets vs actuals. So, the formula is counting if the actual percentage is lower than the target, but I also need to include if the actual number is greater than the target (ie you were allowed two fails, but had 3)

    This is a set format so cannot be changed. I am just arranging a summary sheet to draw the data in from multiple excels.

    Thanks

  6. #6
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Countif range less than range

    Do row 2,9,15, which you like to work with, have any thing different to others, in order to mark them? For instant, C2,C9,C15 contain text "Average", or some thing else. Then we can mark these row to use SUMPRODUCT.
    Value as average normally around 1, right? Is it a big difference to other values in the column?
    Can you upload a small worksheet?
    Last edited by bebo021999; 02-19-2014 at 12:30 PM.

  7. #7
    Forum Contributor
    Join Date
    08-20-2012
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Countif range less than range

    yes, they are all marked with "SEE" in column A.

    I have uploaded a test workbook. I will just have a summary based on the total number of fails (ie under target % and over target number ("SEE")

    Many thanks in advance
    Attached Files Attached Files

  8. #8
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: Countif range less than range

    So with "SEE" in A column, find the difference btw the two coresponding columns C & B, then count where C < B?

    If yes, try:

    =SUMPRODUCT(--(IF($A$1:$A$23="SEE",($C$1:$C$23-$B$1:$B$23),0)<0))

    ...confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces

    { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

  9. #9
    Forum Contributor
    Join Date
    08-20-2012
    Location
    London,England
    MS-Off Ver
    Excel 2010
    Posts
    184

    Re: Countif range less than range

    Thank you, that is great. Can I do the same but if it does not equal "SEE"? as in my test file, I need to know the number of fails so this would be everything under target percentage, plus over the target "SEE".

    If I do the same formula for all, it counts all the "SEE" as a fail because it is less than the target (not so much a target, but an allowed number of fails).

    I really appreciate this help.

    Thanks in advance

+ 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. [SOLVED] Countif / Sumif Range in a 24 Hour Time Range
    By cwwazy in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-16-2013, 04:18 PM
  2. Combining a Date Range COUNTIF and a general COUNTIF
    By jacobtom in forum Excel General
    Replies: 1
    Last Post: 09-15-2011, 05:06 PM
  3. Replies: 15
    Last Post: 06-27-2011, 08:58 PM
  4. Countif in more than one range
    By abb16ott in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-17-2009, 02:56 AM
  5. COUNTIF or not to COUNTIF on a range in another sheet
    By Ellie in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-15-2005, 05:06 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