+ Reply to Thread
Results 1 to 2 of 2

I Need Help with Counting Consecutive Cells

  1. #1
    Registered User
    Join Date
    09-13-2015
    Location
    England
    MS-Off Ver
    2013
    Posts
    1

    Exclamation I Need Help with Counting Consecutive Cells

    Hi,

    I have a piece of equipment which tracks the number of times an organism moves within a certain unit of time (e.g. 30s). The numbers are registered in columns. If the organism does not move in that time frame, the cell is left blank. If it moves once, the number 1 appears, if twice the number 2 appears, and so on.

    I would like to create a formula by which I count the number of more than 1 consecutive blank cells in each column. The values would ideally be posted across a row, in a different sheet.
    e.g.

    2
    3
    1
    2
    3
    1
    5

    So the count for this column would be:
    4 2 2

    As stated, the 1 blank cell would not be counted, since values greater than 1 are needed.

    The row shows how the formula should present the results. I'm not interested in the number of times that blanks occurs, but rather the size of each consecutive blank occurrence of >1. The size of each occurrence needs to be represented in a separate cell. That's what's on show in the rows.

    Thus:

    1. The first occurrence of >1 blank, there were 4 blanks, as shown in the first cell of the row.
    2. The second occurrence of >1 blank, there were 2 blanks as shown in the second cell of the row.
    3. The third occurrence of >1 blank, there were 2 blanks as shown in the third cell.

    Any help would be greatly appreciated, this is kind of urgent. Thanks!

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    30,694

    Re: I Need Help with Counting Consecutive Cells

    See attached.

    Formula in Column B records count of blanks between values.

    Put in B2

    =IF($A1<>"",IF(COUNTA($A2:$A1000),MATCH(TRUE,$A2:$A1000<>"",0)-1,""),0)

    Enter with Ctrl+Shift+Enter

    Copy down as required

    Formula in D1 extracts counts > 1 and puts them in the row,

    in D1

    =IFERROR(INDEX($B$1:$B$16,SMALL(IF($B$1:$B$16>1,ROW($B$1:$B$16)-ROW($B$1)+1,""),COLUMNS($A$1:A1))),"")

    Enter with Ctrl+Shift+Enter


    Drag formula across row as required
    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)

Similar Threads

  1. [SOLVED] counting consecutive cells
    By josh101287 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-21-2015, 06:04 AM
  2. Replies: 6
    Last Post: 02-13-2015, 08:47 AM
  3. [SOLVED] Counting consecutive cells in a row
    By her.rockstar in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-04-2013, 12:44 PM
  4. Counting of consecutive cells
    By wolis in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2012, 10:40 AM
  5. Counting consecutive cells
    By KMU in forum Excel General
    Replies: 3
    Last Post: 05-11-2010, 08:16 PM
  6. Counting Consecutive Cells
    By SteveC in forum Excel General
    Replies: 18
    Last Post: 06-21-2006, 01:46 PM
  7. Counting consecutive blank cells
    By KevinE in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-15-2005, 09:40 AM

Tags for this Thread

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