Using COUNTIF with a range of numbers

Hi, This has been bugging me for a while - and hopefully you can help
I am counting the scores a particular set of children are getting in a test. I need to count how many of these children get between 4.5 and 5.5
I've been trying with the below expression - but it does not work! How do I express between 4.5 and 5.5?
COUNTIFS(Data::$B$3:$B$33,FALSE,Data::I$3:I33,">4.5,<5.5")÷COUNTIF(Data::$B$3:$B $33,FALSE)

Hi Gwyn,
Columns C to H are hidden to make a smaller screen shot.
Column B all cells are FALSE (unticked) to keep this simple.
The result appears in the Countifs table with this formula in A2:
=COUNTIFS(Data::B,"=FALSE",Data::I,">4.5",Data::I,"<5.5")
Note the Header Row in the Data table to allow reference to all Body Cells (for example, Data::B instead of a specific range of cells). That will allow you to add or delete rows, and the COUNTIFS formula will still work
The syntax for COUNTIFS is (from the Functions Panel)
COUNTIFS(test-values, condition, test-values…, condition…)
Regards,
Ian.

Similar Messages

  • Using the IF function with a range of numbers

    I am working with the IF function and trying to get it to work "if" the number I'm examining is within a range of numbers.
    Example:
    If a wigit costs between $1000 and $1999, then a discount of $100 is given
    If a wigit costs between $2000 and $2999, then a discount of $150 is given
    If a wigit costs between $3000 and $3999, then a discount of $225 is given
    And so on.
    If cell A1 always holds the current cost of the wigit being sold.
    cell B1,B2,B3 holds the value of the discount values respectively.
    In cell C1 I would like to return what the current discount value is to be given for the wigit price in cell A1?
    How do I do this using the IF function or is there another way?
    Thanks,
    Ryan

    HI Ryan,
    In this post you have, except for the issue noted by Badunit, the basis for the discount table described by Wayne:
    I'm trying to devise a way of knowing what Cash Card a customer will receive depending on the amount of the purchase, based on the following table:
    $0         to $999 purchase         =      $50 Cash Card
    $1,000 to $1,999 purchase     =     $100 Cash Card
    $2,000 to $2,999 purchase      =     $200 Cash Card
    $3,000 to $3,999 purchase      =      $300 Cash Card
    $4,000 to $4,999 purchase      =      $400 Cash Card
    $5,000 to $5,999 purchase      =     $550 Cash Card
    $6,000 to $6,999 purchase     =      $700 Cash Card
    $7,000 to $7,999 purchase      =     $850 Cash Card
    $8,000 to $8,999 purchase     =      $1,000 Cash Card
    $9,000 to $9,999 purchase     =     $1,200 Cash Card
    $10,000 to   UP   purchase     =     $1,500 Cash Card 
    To take care of the issue noted by Badunit, you need to revise the top line to state the minimum purchase necessary to earn a cash card, then add a line above that to handle purchases under that amount. I've arbitrarily chosen a $500 minimum, which results in these two lines:
    $0             to $499 purchase        =      $0 Cash Card
    $500         to $999 purchase         =      $50 Cash Card
    To write this as Wayne's table, you need to remove all of the text (including the $ currency markers), the top end of each range, and the = sign. What you're left with is two columns of numbers: The bottom number of each range of values, and the number telling the dollar amount of the cash card for that range. Here's your table, edited to make it work with LOOKUP:
    Here is a second table (Main), containing only the labels and the two cells involved in the calculation of the cash card amount. The Purchase amount is the amount used in your example. The Cash Card amount is produced by the LOOKUP formula below the image.
    Purchase price is in cell B1 of the table "Main". The LOOKUP formula is in B2:
    B2: =LOOKUP(B1,CC Amt :: A,CC Amt :: B)
    LOOKUP acts essentially as you request in your post containing the iPad image with the time shown as 1:46. But it takes a much simpler approach.
    Here's the syntax:
    LOOKUP(search-for,search-where,return-from)
    LOOKUP gets the search-for value (2535) from cell B1.
    It looks in column A of the table "CC Amt" for the largest value less than or equal to the search-for value, and finds 2000.
    It returns the value from the same line of column B (200).
    Below are two more examples. Main-2 and Main-3 are copies of the Main table. Both contain exactly the same formula as Main, but have had a different Purchase price amount entered. LOOKUP uses the same CC Amt table as is used above, and returns the appropriate Cash Card value for each of the two new amounts:
    You may, as implied in your 1:46 post, use a pair of cells to calculate the Cash Card amount for each widget in the purchase, then total the Cash Card amounts, or you may use a single pair of cells, one containing the total purchase amount, the other containing the Cash Card amount due for that total. That choice is yours. The formula is the same for either case.
    Regards,
    Barry

  • IF Else (javascript) with a range of numbers

    I am creating form fields in a PDF using Acrobat.  There is a field which you enter an amount (1-20, 21-100, 100+) and depending on what is entered the cost will be different.  So if 1 thru 20 units are entered the cost will be $199 per unit, 21 thru 100 units the cost is $175 per unit and 100+ units the cost is $150 per unit.  The line on the document looks like:  Number of Entities___ X Price per Entity___= Total___. 
    This is what I have so far to get the price;
    if (this.getField("No. of Entities").value == '1') {
    event.value = 199
    } else if (this.getField("No. of Entities").value == '21') {
    event.value = 175
    } else if (this.getField("No. of Entities").value == '101') {
    event.value = 150
    } else {
    event.value = 0 // Default value here
    I have it working for a single number, I just can't get a range of numbers.
    Any help would be great, thanks.

    The problem is in the logic of your condition.  This will only hit when you have the value of 1, 21, or 101.
    I'd suggest a different set of logic, based on <= operators
    if (this.getField("No. of Entities").value <= '20') {
    event.value = 199
    } else if (this.getField("No. of Entities").value <= '100') {
    event.value = 175
    } else if (this.getField("No. of Entities").value >= '101') {
    event.value = 150
    } else {
    event.value = 0 // Default value here
    or something along those lines.  I would also imagine that having the operators be numeric (no quotes on the constant) would be more effective.
    But this is general JS advice and not tried within a form.
    Also, I have a question for you.  Are you designing this as an PDF form inside Acrobat, or are you using LiveCycle Designer?  That information will help when we move this issue into the proper forum.

  • Help using countifs with pop-up menus please

    made a spreadsheet and am using pop-up menus as the cell format to list several shifts when making a schedule for my job, so far so good.
    now i would like to total across the rows for each type of shift in 3 categories so for instance, i would like to create a formula that will tally the number of times i selected either the drop down for 9a-6p or 10a-7pm...i can get it to count one occurance by using =COUNTIF(B5:H5, "=9A-6P")...so i was trying something like =COUNTIFS(B5:H5,"=9A-6P",B5:H5,"=10A-7P") to get it to total the number of times i chose both of those text entires for the drop down, but that seems to be missing something...any help would be appreciated....

    Hi Steph,
    What you're missing is this (From the iWork Formulas and Functions User Guide):
    COUNTIFS(test-values, condition, test-values..., condition...)
    test-values:   A collection containing values to be tested. test-values is a collection containing any type of value.
    condition:   An expression that results in a logical TRUE or FALSE. condition is an expression that can contain anything as long as the result from comparing condition to a value in test-values can be expressed as a Boolean value of TRUE or FALSE.
    test-values...:  Optionally include one or more additional collections containing values to be tested. Each test-values collection must be followed immediately with a condition expression. This pattern of test-values, condition can be repeated as many times as needed.
    condition...:  If an optional collection of test-values is included, an expression that results in a logical TRUE or FALSE. There must be one condition following each test-values collection; therefore, this function will always have an odd number of arguments.
    Usage Notes
    Each value in test-values is compared to the corresponding condition. If the
    corresponding values in each collection meet the corresponding conditional tests,
    the count is increased by 1.
    The test-values, condition pairs may be thought of as a series of tests connected by AND(s)—the whole set is TRUE only if ALL parts are TRUE.
    Your formula should be returning a zero count and you are testing the same set of values for two exclusive conditions—any pop-up set to "9A - 6P" cannot be also set to "10A - 7P"—at least one of the conditions will be false in every case.
    For the results you want, you'll need a formula that counts each value/condition set separately, and adds the results:
    =COUNTIF(B5:H5,"=9A-6P")+COUNTIF(B5:H5,"=10A-7P")
    OR
    =SUM(COUNTIF(B5:H5,"=9A-6P"),COUNTIF(B5:H5,"=10A-7P")
    Regards,
    Barry

  • Using countif for multiple ranges

    I have a spreadsheet where I need to count a value in several ranges in the same column. Can't figure out how to do it

    You can't have non-contiguous ranges but the range can include blank rows. I mention that second part because I don't know what is between your ranges.
    You either need to use multiple COUNTIF functions or duplicate the data in another spot (such as another table) where you can make it all one big range (with or without blank rows). The table will simply be a bunch of formulas like =Table 1:: B2

  • Using Smartsuite with a range of phones

    I have two types of phone which I want to use with Nokia Smart Suite,
    I have several 6310i's which I regularly use with v 4.88 to download SMS messages etc.
    I now have a 6230i which is my everyday phone. I would like to use infra red and PC suite with both phones and have 2 issues.
    1.) I cannot seem to load both PC suite versions without getting conflicts on the communications side as they appear to use different communication 'stubs'
    2.) Some of the features of the old PC suite are missing from the new PC suite - e.g. Phone Editor which I used to use for managing my SMS's (or have I just not installed it?)

    I think you have made all the right conclusions, you cannot really use 4.88 and 6.xx PC Suite in same PC and new PC Suite is lacking the old Phone Editor application.
    These changes in Nokia PC Suite happened at the same time when PC Suite started to support all Nokia phone models, the "feature phones" (S40 phones) and then the smart phones which have Symbian operating system imbedded, i.e. S60 phones and the new communicators 9300, 9300i and 9500. At the same time when this happened, the old PC Suite's for the smart phones were left behind and PC Suite 6.xx versions started to support smart phones also. And some old applications like Phone Editor, Sound Converter and lately also Image Converter have been dropped from application list.
    What you can do is to use the 6230i and PC Suite 6.7 and you can still syncronise the 6310i with it (At least that's what I head in these forums that it can be syncronised although PC Suite may indicate that the connection is not happening, PC Sync still recognises it)

  • How to test if String starts with a Range of numbers

    Hello,
    I'm reading in a line from a text file and I want to see if that line starts with numbers.
    I know there is
    String temp = file.readline();
    if (String temp.startsWith(?1-9?); // want to check if string starts with 1 thru 9
    Thanks!

    Try the following:
    String temp = file.readline();
    if (temp.equals("1") || temp.equals("2")....... || temp.equals("9") {
    System.out.println("String is beetween 1 - 9");
    else{
    System.out.println("String is not beetween 1 - 9");
    Replace the "....." by the other values... I know it's quite long, but it should work... must be an easier way though...
    Pierre

  • Using NAST WITH DATE RANGE THE ZPROGRAM GIVING DUMP

    Hi Frineds,
    i am  writing select query from  NAST table for PO created time based on date range more than 10 days the program is giving DUMP in Quality System.. but in Developement system the dump is not coming for same date range.
    please see the below code......that i ahve written. help me.
    IF SY-SUBRC EQ 0.
        SELECT KAPPL
           OBJKY
           KSCHL
           SPRAS
           ERDAT
           ERUHR
           FROM NAST
           INTO TABLE IT_NAST
            WHERE KAPPL = 'EF' AND
                  OBJKY IN R_OBJKY AND
                   KSCHL IN S_KSCHL
                  AND ERDAT IN S_DATE
                  AND ERUHR IN  S_ERUHR.
        SORT IT_NAST  BY OBJKY.
        DELETE ADJACENT DUPLICATES FROM IT_NAST COMPARING OBJKY.
      ENDIF.
    ENDIF.
    regards,
    Vijay
    Edited by: Rob Burbank on Jan 21, 2010 12:42 PM

    Hi,
    thanks for your mail..
    the dump message
    There is no help text for this dump
    Either the text was inadvertently deleted or the release of
    the kernel differs from the release of the database
    Refer to the Note system for further information on            this dump.
    Regards,
    Vijay

  • Where Used List with multiple/range of material

    Hi there Gurus!
    We have requirement to have multiple material on CS15(Where-used List Single-Level Material).
    IW13 won't work since there are spares/eqpmnt that has no PM Order yet.
    We are looking at developing SAP Query for this using but I am reluctant if this will work since it's from bottom going up.
    Has anyone tried this? Any tip/watchout?
    Your very valuable input is highly regarded and will be rewarded.
    Thanks a lot in advance!

    Hello Thyagarajan,
    Thanks for clarifying the requirement.
    Can only input one material in selection screen of CS15 and what we want is functionality to enable multiple material entry. Thanks!
    Hi Pete,
    Thanks for your input.
    When you copy CS15 and modify to enable multiple material entry, what other options did you consider before deciding on copying CS15? Does your other options include SAP Query? Do you think it will meet our reqmnt? Thanks!

  • I have two different 5s's with two different phone numbers but they are both using the same iCloud/apple account. After upgrading to iOS8 when I get a phone call on one phone both phones ring.

    I have two different 5s's with two different phone numbers but they are both using the same iCloud/apple account. After upgrading to iOS8 when I get a phone call on one phone both phones ring. One phone is for work and one is for private and I don't need both phones to ring from one call. It's bizarre.......is this supposed to be like this? If so where can I turn it off?? And while we are at it iOS8 has installed iBooks on both of my phones and iTunes won't let me uninstall it. I don't need or want iBooks on my phones.

    Hi,
    There are two easy fixes to this.
    One, you can set up Family Sharing, in which you can have two different iCloud Accounts, yet still share the same apps, music, media etc.
    Two, go to Settings and turn-off "Handoff". This can be found under the General page.
    Hope this helps!

  • How do I select a range of numbers using IF function

    I am trying to select a name in a cell if the value of another cell is either a 5,6,7,8 or 9.  I have had success when I have just wanted numbers above 9 or below 5 by using formulas
    IF(Table 1::C3<5,T(Table 1::A3),T(Table 1::A2))
    And
    IF(Table 1::C3>9,T(Table 1::A3),T(Table 1::A2))
    But for the life of me can't get the range of numbers in between.
    I have tried including AND and OR functions in multiple ways but to no success.  I know I am overlooking some simple thing, I have tried scratching for nested if functions but no help there either, and the information file in numbers is horrendously useless.
    Please help.  I am using an ipad btw.

    This forum is generally for iPad and iOS problems. I doubt that you'll get an answer here.
    Furthermore, you don't say what app you are using. If Numbers, you should post here https://discussions.apple.com/community/app_store/iwork_for_ios
     Cheers, Tom

  • Am I able to use a Hawking 300 Range Extender with the Apple Extreme connected to a PC?

    I am puchasing an Apple Extreme to replace a Linksys router connected to a PC with Win7.  I have been using two Hawking 300 Range extenders to get a better single throughout my home.  Will I be able to continue to connect the Hawking 300 Range Extenders to the Apple Extreme? 

    Will I be able to continue to connect the Hawking 300 Range Extenders to the Apple Extreme?
    Apple's "extend a wireless network" feature on the AirPort Extreme appears to be a proprietary setting that only works with other Apple products.
    So, it is extremely unlikely that the Hawking devices will work with the AirPort Extreme.
    No harm in trying though.
    Please post on your findings.

  • I am currently in Cameroon, Africa and after arriving here, I added Global services to my plan in hopes to be able to use my phone to call local numbers.  When I dial local numbers in Cameroon, with or without the country code, the call fails.  I suspect

    I am currently in Cameroon, Africa and after arriving here, I added Global services to my plan in hopes to be able to use my phone to call local numbers.  When I dial local numbers in Cameroon, with or without the country code, the call fails.  I suspect it may be that the phone is 3G and this area only supports 2G.  Help!

    cctga,
    We appreciate you taking the time to reach out to us. I am sorry to hear that you are having trouble while traveling. We definitely want to make sure you have all available options. Normally when traveling internationally we reccommend setting up international services prior to leaving. When you added the services did you do so online or with a rep? It would be best to contact our global department in order to troubleshoot any and all issues with services while international http://vz.to/17KseUf.
    Thank you,
    TonyG_VZW
    Follow us on Twitter @VZWSupport

  • RMA with reference to Serial Numbers using oe_order_pub.process_order

    Hi,
    Can any one pls let me know how to create RMA with reference to Serial Numbers using oe_order_pub.process_order API.
    Thanks,
    Praveen
    Edited by: user11186474 on Feb 19, 2010 6:00 AM

    We need to pass the following parameters when doing RMA with reference to Serial numbers.
    l_line_tbl (1).return_reason_code := 'WRONG PRODUCT';--RETURN REASON CODE
    l_line_tbl (1).reference_line_id :=390744;--Sales order Line ID
    l_line_tbl (1).reference_header_id :=193001;--Sales Order Header ID
    l_line_tbl(1).return_context := 'SERIAL';--REFERENCE TYPE
    l_line_tbl(1).return_attribute1 := '215990';--ITEMID FOR RMA
    l_line_tbl(1).return_attribute2 := 'RMA_TEST-9';--SERIALNUMBER
    Thanks,
    Praveen

  • Can i use a cisco RE1000 range extender with airport extreme

    Can I use a Cisco R1000 range extender with airport extreme?

    Apple's "extend a wireless network" function appears to be a proprietary feature that will only work with other Apple routers.
    As far as we know, devices from other manufacturers are not compatible with this feature.
    Bottom line....It would be extremely unlikely that this would work, but it's worth a try if you already have the products in hand.
    Please post on your results.

Maybe you are looking for

  • How to go back if you make a mistake?

    I have a new N8.  I've googled and searched help but can't find the answer.  How do you go back or cancel out of something if you've opened it by mistake or have changed your mind (like in messages)? Solved! Go to Solution.

  • Troubleshooting shutdown issues

    So, my brand new 13" MacBook is having difficulty shutting down properly. When I attempt to shut down, all apps quit, as well as the Finder (I'm assuming since the menu bar disappears as well as all icons on the desktop), but I'm left with nothing bu

  • How to insert the checkbox as a separate column  in alv grid display

    Hi How to insert the checkboxes as a separate column  in alv grid display with using the reuse_alv_fieldcatlog_mege. example matnr    maktx  ersda                 checkbox 10        books  28/03/2009          checkbox Thanks chinnu

  • Emails won't load

    For about a week now, my emails haven't been loading. The email headers/subject will show but no content in the body. We've changed nothing but noticed this, amongst other things, after the most recent Android install.

  • Using BTvision box abroad

    I am currently living in France so while away the long lonely evening I pre recorded good old Brit telly on my Vision box, filled to its max of over 100 hours. But now as it is not connected to a phone line it does not work What am I to do as now get