+ Reply to Thread
Results 1 to 7 of 7

Counting cells in-between 2 values

  1. #1
    Registered User
    Join Date
    02-15-2016
    Location
    United Kingdom
    MS-Off Ver
    2019
    Posts
    5

    Counting cells in-between 2 values

    Hi,

    I have tried searching for the answer, but I am struggling to piece it together correctly, so thank you in advance for any assistance.

    Effectively I need a dynamic formula that will count the number of cells beneath a specific value - let's call that value '0' - up until the next '0', return that count and repeat the process from the next '0', etc.

    I have attached a workbook with a handful of examples of the expected output.

    Hopefully this is something simple that I am overlooking.

    Thanks!
    Attached Files Attached Files
    Last edited by IreSaffa; 11-04-2021 at 04:06 AM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Counting cells in-between 2 values

    deleted...
    Last edited by protonLeah; 11-03-2021 at 04:30 PM.
    Ben Van Johnson

  3. #3
    Valued Forum Contributor
    Join Date
    02-04-2009
    Location
    Texas
    MS-Off Ver
    Excel 2016
    Posts
    665

    Re: Counting cells in-between 2 values

    For Kicks and giggles, I messed around and came up with this (not array)
    Please Login or Register  to view this content.
    I eliminated Row 2 because even though it is a 0 - there are no preceding rows.
    add formula to A2 (the ranges will be one row short of formula row)
    If this solves your issue, Mark thread as Solved & Add Reputation.

    Thanks!

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Counting cells in-between 2 values

    Similar to CRIMEDOG's but using approximate MATCH for the last part this in B2 and filled down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  5. #5
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Counting cells in-between 2 values

    Here's another.

    Will need to be array entered in B2 and filled down.

    If you aren’t familiar with array-entered formulas array enter means the formula must be committed from edit mode by simultaneously pressing and holding down Ctrl and Shift while hitting Enter.

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

  6. #6
    Registered User
    Join Date
    02-15-2016
    Location
    United Kingdom
    MS-Off Ver
    2019
    Posts
    5

    Re: Counting cells in-between 2 values

    Thank you so much for the assist, this is brilliant.

  7. #7
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: Counting cells in-between 2 values

    You are welcome. Glad to help. Thank you for the feedback and marking your thread Solved.

+ 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. Counting Empty Cells Between Two Values
    By billykiller05 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-26-2014, 08:10 PM
  2. Counting cells that only have values
    By jericho14444 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-27-2013, 07:42 AM
  3. Counting cells based on values of adjacent cells
    By SpookyAlienX in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-26-2013, 08:20 PM
  4. [SOLVED] Counting cells that only have values
    By imran91 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-10-2012, 05:04 AM
  5. Replies: 0
    Last Post: 05-08-2012, 12:42 PM
  6. Counting values in cells and a range
    By jcgroove in forum Excel General
    Replies: 5
    Last Post: 06-08-2009, 02:02 PM
  7. Counting Cells with Specific values
    By javaman12 in forum Excel General
    Replies: 1
    Last Post: 04-20-2009, 03:54 PM
  8. Counting Cells with odd and/or even values
    By yungexec in forum Excel General
    Replies: 4
    Last Post: 07-26-2006, 04:05 AM

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