+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : Counting Non Blank Cells within a dynamic range

  1. #1
    Registered User
    Join Date
    11-23-2010
    Location
    Adelaide
    MS-Off Ver
    Excel 2007
    Posts
    9

    Counting Non Blank Cells within a dynamic range

    Hi All,

    My first thread in here.

    I have a situation where I have to count the number of Non Blank cells within a range which keeps on changing as situation changes.

    To be more specific,

    On Column D, from row 18 to row 29, I have values, then on row 30 I have a blank cell.
    Again on Column D, from row 31 to row 40, I have values and then on row 41, I have a blank cell. I need a formula to count the number of Non blank cells until the first blank cell is reached or a formula when the first blank cell is hit.

    The below formula searches through the range and gives me the number of the cell at which I have the blank cell. I have a blank cell at row 30 and hence i get the answer 13 using the below formula.

    =MATCH(TRUE,INDEX(ISBLANK(D18:D32),0,0),0)

    and

    =COUNTA(D18:D29).

    Another question is, in the above two formulas, how do I make the range into a dynamic range or a range which changes with change in another cell? I have cell K2 which has the value D5 and K3 as D19. How can I call the cell values into the above formula so that the range in the above formulae automatically changes to the values in the cells K2 and K3?

    In simple terms, if K2 shows D256 and K3 shows D264, the formula should go and search the range between D256 to D264.

    Please help. Been banging my head on this for the past two days. I am using Excel 2007.

    Thanks..

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2007
    Posts
    122

    Re: Counting Non Blank Cells within a dynamic range

    Try this,

    K2=256
    K3=264

    =MATCH(TRUE,INDEX(ISBLANK(INDEX(D:D,K2):INDEX(D:D,K3)),0,0),0)

    and

    =COUNTA(INDEX(D:D,K2):INDEX(D:D,K3))

    Regards

  3. #3
    Registered User
    Join Date
    11-23-2010
    Location
    Adelaide
    MS-Off Ver
    Excel 2007
    Posts
    9

    Re: Counting Non Blank Cells within a dynamic range

    Quote Originally Posted by sailepaty View Post
    Try this,

    K2=256
    K3=264

    =MATCH(TRUE,INDEX(ISBLANK(INDEX(D:D,K2):INDEX(D:D,K3)),0,0),0)

    and

    =COUNTA(INDEX(D:D,K2):INDEX(D:D,K3))

    Regards

    Thanks Bro..Works Beautifully...Thanks a lot...

+ 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