+ Reply to Thread
Results 1 to 6 of 6

Number of values within each closed interval

  1. #1
    Registered User
    Join Date
    01-30-2020
    Location
    Planet Earth
    MS-Off Ver
    2016
    Posts
    96

    Number of values within each closed interval

    Hi,

    I'm trying to count the number of values within each closed interval (such that the upper and lower limits are included as well), however it yields 0.
    Please find attached the Excel Spreadsheet with my attempt below, including the expected results as well.

    Please Login or Register  to view this content.
    This should give 2, since there are 2 values from rows 1-5 Columns A-L within that closed interval on A17 and B17.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
    Posts
    58,988

    Re: Number of values within each closed interval

    COUNTIFS requires a 2D array, not 3D.

    Try this:

    =SUMPRODUCT(($A$1:$L$5>=A17)*($A$1:$L$5<=B17))
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" to anyone who has offered you help in your thread. You can reward them by clicking on * Add Reputation below theur user name on the left, if you wish.


    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.

  3. #3
    Registered User
    Join Date
    01-30-2020
    Location
    Planet Earth
    MS-Off Ver
    2016
    Posts
    96

    Re: Number of values within each closed interval

    Nice one, it works! Thanks a lot for your quick reply, much appreciated! Rep+
    Last edited by AliGW; 10-11-2021 at 05:11 AM. Reason: PLEASE don't quote unnecessarily!

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, England
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
    Posts
    58,988

    Re: Number of values within each closed interval

    Pleasure. Thanks for the rep.

  5. #5
    Forum Expert
    Join Date
    05-05-2015
    Location
    Waterlooville,England
    MS-Off Ver
    Office 2010
    Posts
    22,614

    Re: Number of values within each closed interval

    =COUNTIFS($A$1:$L$5,">=" & $A17,$A$1:$L$5,"<="& $B17)

    Wrong quotation marks highlighted in red in your formula
    Attached Files Attached Files
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  6. #6
    Registered User
    Join Date
    01-30-2020
    Location
    Planet Earth
    MS-Off Ver
    2016
    Posts
    96

    Re: Number of values within each closed interval

    Thanks a lot! Spot on! You're absolutely right, nice one! Rep+
    Thread solved. Thank you for your input! Much appreciated

+ 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. Retrieve number from interval
    By CoSinus in forum Excel General
    Replies: 7
    Last Post: 07-15-2020, 08:48 AM
  2. Interval between Occurrences, Counting gap from >= number to the next number
    By PHaRTnONu in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-04-2017, 01:35 AM
  3. Export data with two Criteria values from closed workbook to closed workbooks VBA
    By julielara in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-07-2016, 01:56 PM
  4. Replies: 1
    Last Post: 04-29-2014, 04:42 AM
  5. Return value of interval number
    By jacvgraca in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-13-2014, 12:39 PM
  6. [SOLVED] How to make an interval and search for values within that interval?
    By gamoerma in forum Excel General
    Replies: 12
    Last Post: 10-13-2013, 10:33 AM
  7. Replies: 2
    Last Post: 06-06-2012, 01:44 PM

Tags for this Thread

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