+ Reply to Thread
Results 1 to 3 of 3

Conditional Count

Hybrid View

andrewc Conditional Count 12-29-2009, 11:54 AM
daddylonglegs Re: Conditional Count 12-29-2009, 12:41 PM
andrewc Re: Conditional Count 12-30-2009, 06:42 AM
  1. #1
    Forum Contributor
    Join Date
    02-08-2005
    MS-Off Ver
    Microsoft 365
    Posts
    839

    Conditional Count

    I am trying, without success, to create a formula that will refer to a column of data and do the following in one step:

    1. Find the minimum value in the range, and then
    2. From that minimum value, count back “up” the column the number of occurrences, including the minimum value, until a zero is reached. The zero should not be counted.

    For example, if the values in A1:A6 are 1, 0, 2, -1, -2, 1, the minimum value is -2 and the count would return 3. (i.e. 2, -1 and -2)

    Can someone please help?

    Thank you!
    Last edited by andrewc; 12-30-2009 at 06:42 AM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,726

    Re: Conditional Count

    Try this formula

    =MATCH(MIN(A:A),A:A,0)-MATCH(0,A1:INDEX(A:A,MATCH(MIN(A:A),A:A,0)),0)

  3. #3
    Forum Contributor
    Join Date
    02-08-2005
    MS-Off Ver
    Microsoft 365
    Posts
    839

    Re: Conditional Count

    Thanks very much

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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