+ Reply to Thread
Results 1 to 4 of 4

counting the number of instances of blank cells in a range

  1. #1
    Registered User
    Join Date
    09-10-2012
    Location
    the moon
    MS-Off Ver
    Excel 2010
    Posts
    9

    counting the number of instances of blank cells in a range

    HI,

    First I'm not sure if this is possible with formulas and may need to be done using VBA but here goes.

    What I need excel to do is count the number of times there is a gap/instance of blank cells in a column of data - NOT to just count the number of blank cells.

    Say the data was as follows:

    Row a 112
    Row b 4861
    Row c 41861
    Row d
    Row e
    Row f 4865
    Row g 99
    Row h
    Row i 66636
    Row j
    Row k 4156146
    Row l 786176
    Row m 617917
    Row n
    Row o
    Row p
    Row q
    Row r 861768

    In that range there would be 4 gaps between the cells with data in them. Is it possible to count this? The data I have has thousands of rows so this would take forever counting manually.

    Thanks in advance!

  2. #2
    Valued Forum Contributor Melvinrobb's Avatar
    Join Date
    06-19-2012
    Location
    Manitoba, Canada
    MS-Off Ver
    Excel 2013
    Posts
    1,128

    Re: counting the number of instances of blank cells in a range

    Assuming your data starts in cell B2, I would insert the following formula in cell C2 and drag down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    You can then simply sum column C to get the # of gaps.
    Please click the * icon below if I have helped.

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: counting the number of instances of blank cells in a range

    Try

    =COUNTIFS(C2:C18,"",C1:C17,"<>")

    Notice the offset of 1 row between the 2 ranges, this was intentional.

  4. #4
    Registered User
    Join Date
    09-10-2012
    Location
    the moon
    MS-Off Ver
    Excel 2010
    Posts
    9

    Re: counting the number of instances of blank cells in a range

    Thanks melvinrobb, worked a treat

+ 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