+ Reply to Thread
Results 1 to 6 of 6

Count nr of rows if condition meets

  1. #1
    Registered User
    Join Date
    07-02-2007
    Posts
    42

    Question Count nr of rows if condition meets

    Hi,

    I have data as following example in col A

    3.4
    3.6
    4
    4.6
    6.7
    7
    8
    8.5
    7.6
    6
    5
    4

    I want to count the nr of rows from start; when the value in the next row becomes less than the previous row. For eg in the case about it would be row nr 8 as 7.6 is less than 8.5. can anyone tell me what function can be used for this.

    /tahir

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.83 (24031120))
    Posts
    8,729

    Re: Count nr of rows if condition meets

    all the values up to 8 are less then the next row in your example

    3.4 is less than 3.6
    3.6 is less than 4

    etc

    I was going to suggest
    if the numbers start in A2
    then in B2 put
    =IF(A2<A3,COUNT($A$2:A2),"")
    and copy down

    see attached

    would you confirm the rules you would like to apply
    Attached Files Attached Files

  3. #3
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,445

    Re: Count nr of rows if condition meets

    Perhaps
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    07-02-2007
    Posts
    42

    Re: Count nr of rows if condition meets

    thanks etaf, this is what i was looking for

  5. #5
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: Count nr of rows if condition meets

    Hi tahirawan11

    Assuming your data is in A1:A12, in B1 and copy down. Perhaps something like this!

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Regards Kevin


    Merged Cells (They are the work of the devil!!!)

  6. #6
    Registered User
    Join Date
    07-02-2007
    Posts
    42

    Re: Count nr of rows if condition meets

    Quote Originally Posted by Pepe Le Mokko View Post
    Perhaps
    Please Login or Register  to view this content.
    i tried with the formula but i didnt got the correct answer
    Attached Files Attached Files

+ 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