+ Reply to Thread
Results 1 to 4 of 4

Count number of clusters of numbers within a column of numbers

  1. #1
    Registered User
    Join Date
    08-01-2016
    Location
    brisbane, australia
    MS-Off Ver
    2010 professional
    Posts
    3

    Count number of clusters of numbers within a column of numbers

    I have a column of numbers which may be either positive or negative numbers. I need to be able to count the number of clusters of positive numbers in that column of numbers where the cluster is = to or greater than 3 consecutive positive numbers. Meaning, if 3,5, 18 occurs consecutively that is a cluster and is counted as 1, as would be 19, 59, 24, 83 counted as cluster 2 and so on. Any help would be appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count number of clusters of numbers within a column of numbers

    Try these array formulas**.

    For positives:

    =SUM(IF(FREQUENCY(IF(A5:A29>=0,ROW(A5:A29)),IF(A5:A29<0,ROW(A5:A29)))>=3,1))

    For negatives:

    =SUM(IF(FREQUENCY(IF(A5:A29<0,ROW(A5:A29)),IF(A5:A29>=0,ROW(A5:A29)))>=3,1))

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    08-01-2016
    Location
    brisbane, australia
    MS-Off Ver
    2010 professional
    Posts
    3

    Re: Count number of clusters of numbers within a column of numbers

    Hi Tony,
    Thanks for that. Works great.
    Chris

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Count number of clusters of numbers within a column of numbers

    You're welcome. Thanks for the feedback!

+ 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. Count number of clusters of numbers within a column of numbers
    By SEABOND in forum Hello..Introduce yourself
    Replies: 3
    Last Post: 08-01-2016, 09:34 AM
  2. Count only even numbers and list number in linked column
    By ricklou in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-02-2015, 06:04 AM
  3. Check for Number in one column - then count specific numbers in a range.
    By CarlosM1 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-29-2014, 05:10 AM
  4. [SOLVED] Count the number of unigue numbers based on number in another column.
    By ksmith4809 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-27-2013, 09:11 AM
  5. Replies: 6
    Last Post: 12-22-2012, 05:04 PM
  6. Replies: 5
    Last Post: 09-01-2011, 03:46 AM
  7. Count the number of unique Numbers in a column
    By ajajmannen in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 05-10-2006, 01:10 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