+ Reply to Thread
Results 1 to 4 of 4

Counting Non blank Cells that fall between cells with conditions

  1. #1
    Registered User
    Join Date
    01-08-2007
    Posts
    13

    Counting Non blank Cells that fall between cells with conditions

    I attached a spreadsheet in case i do not do a good job of explaining. This may not be possible with a formula. I would like a formula to look in a certain column and when it finds text like in the spreadsheet "EXAMPLE 1" it counts all of the non blank beneath it until it either gets to a blank spot or the next "EXAMPLE X".


    Thanks in advance.
    Attached Files Attached Files

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Counting Non blank Cells that fall between cells with conditions

    Based on the sample file:

    F2: =COUNTA(B4:INDEX(B:B,MATCH(REPT("Z",255),B:B)-1))

  3. #3
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Counting Non blank Cells that fall between cells with conditions

    DonkeyOte
    I tried your formula, but I don't know why I got wrong results. Take a look at this book.

    Instead of your formula I used
    Please Login or Register  to view this content.
    in G12.
    Attached Files Attached Files
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Counting Non blank Cells that fall between cells with conditions

    Vusal, correct, per my note it was based on the sample file (ie two records).

    If you wanted to go down the route of using helpers as you have in A (which incidentally I concur is definitely the way to go) I think by adapting the formulae you use in A you can make all subsequent calcs a great deal simpler (and non-volatile), ie (based on your file):

    clear A1 & A2
    A3: =(ABS($E2)+(LEFT($C3,7)="EXAMPLE"))*(1-2*($C3=""))
    copied down for all rows

    Then

    H12: =COUNTIF($A:$A,-1*INDEX($A:$A,MATCH($F12,$C:$C,0)))
    copied down for other examples

+ 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