+ Reply to Thread
Results 1 to 5 of 5

Count the number of times a quantity of entries occur within a range

  1. #1
    Registered User
    Join Date
    06-20-2012
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    6

    Count the number of times a quantity of entries occur within a range

    I am looking for some help creating a formula that I can't seem to figure out.

    I have a column of entries along a distance and I would like to count the number of times there are 10 entries within a certain range (24 meters).

    Thanks in advance!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Count the number of times a quantity of entries occur within a range

    What does a "column of entries along a distance" look like? Can you attach a file with sample data? Is this just a list of distances?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    06-20-2012
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Count the number of times a quantity of entries occur within a range

    Yes just a list of recorded distances.

    Since I can't seem to attach a file, below is an example of the data. There would be thousands of entries in a column

    "Distance
    (m)"
    184.6
    14,929.2
    14,929.2
    14,929.3
    14,929.3
    14,929.4
    14,929.5
    14,929.6
    14,929.8
    14,929.8
    14,929.8
    14,929.8
    14,930.1
    14,930.9
    22,016.2
    22,016.7
    22,016.7
    22,016.7
    22,017.9
    22,018.4
    22,018.5
    22,019.3
    22,019.5
    22,020.4
    22,587.0

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Count the number of times a quantity of entries occur within a range

    count the number of times there are 10 entries within a certain range (24 meters).
    There are a couple of ways to interpret this. What I have done is to count the number of times that any group of 10 consecutive entries falls within 24 meters. So suppose there are 20 consecutive entries that span 24 meters. The first 10 would therefore span 24 m, the group of 10 starting with the second entry would span 24 m, and so forth. So within that group of 20, there are 10 separate groups of 10 that span 24 m.

    See attached. This solution uses a "helper" column to show a flag if the given row is the 10th row in a group of 10 that is under 24 m. Then the total counts the number of flags. There may be a more elegant way to do this without the helper column but I couldn't find one within a few minutes.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-20-2012
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    6

    Re: Count the number of times a quantity of entries occur within a range

    Thanks! That should work.

    I was trying to do it with complicated expressions but sometimes the basic ones are the easiest.

+ 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. Replies: 10
    Last Post: 10-09-2014, 08:06 PM
  2. program a formula to count number of times event occur before a specific time.
    By yinxzon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-17-2014, 04:15 AM
  3. Replies: 5
    Last Post: 07-23-2014, 12:46 PM
  4. Replies: 8
    Last Post: 07-14-2013, 07:29 PM
  5. Need help returning the number of times 2 events occur simultaneously
    By dudakia in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-30-2012, 06:49 PM
  6. Need help returning the number of times 2 events occur simultaneously
    By dudakia in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 11-20-2012, 09:05 PM
  7. [SOLVED] Flagging formula for file names that do not occur a set number of times
    By njmiller31 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-23-2012, 09:34 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