+ Reply to Thread
Results 1 to 8 of 8

count the number of zero values between non-zero values along a single column

  1. #1
    Registered User
    Join Date
    02-15-2021
    Location
    Viriginia
    MS-Off Ver
    365
    Posts
    5

    count the number of zero values between non-zero values along a single column

    Hi,

    I have a column of hourly weight measurements in B which looks like this:0.0075, 0.005, 0.01, 0.015, 0.0075, 0.005, 0.005, 0.0025, 0, 0, 0.0025, 0, 0, 0, 0, 0.0025, 0, 0, 0, 0, 0.0025.I would like to be able to count the span*of zero values between non-zero values in column C, for example 2, 4, 4 . Doing it manually is tedious for a large dataset. The test data is attached. Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: count the number of zero values between non-zero values along a single column

    Hi there,

    See if the following code does what you need:

    Please Login or Register  to view this content.
    The highlighted values may be altered to suit your requirements.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M

  3. #3
    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: count the number of zero values between non-zero values along a single column

    Also here is a formula solution for Office 365.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Dave

  4. #4
    Registered User
    Join Date
    02-15-2021
    Location
    Viriginia
    MS-Off Ver
    365
    Posts
    5

    Re: count the number of zero values between non-zero values along a single column

    Hello FlameRetired, this formula worked flawlessly. I can't thank you enough for assisting me in resolving the issue. Your assistance has made a significant difference.

  5. #5
    Registered User
    Join Date
    02-15-2021
    Location
    Viriginia
    MS-Off Ver
    365
    Posts
    5

    Re: count the number of zero values between non-zero values along a single column

    Greg, thank you for your assistance! I appreciate it

  6. #6
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: count the number of zero values between non-zero values along a single column

    Hi again,

    You're welcome - hope you found my suggestion interesting if not useful.

    Regards,

    Greg M

  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: count the number of zero values between non-zero values along a single column

    @ Isaac Musaazi

    You are welcome. Glad it helps. Thank you for the feedback and marking your thread Solved.

  8. #8
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: count the number of zero values between non-zero values along a single column

    Hi again,

    Many thanks for the Reputation increase - much appreciated!

    Best regards,

    Greg M

+ 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. Count number a column of values passes a certain number
    By bjcowen9000 in forum Excel General
    Replies: 1
    Last Post: 01-24-2020, 01:44 AM
  2. Count paired values within a single row or column
    By metaphysiology in forum Excel General
    Replies: 9
    Last Post: 06-21-2019, 11:46 AM
  3. [SOLVED] Count number of unique values in Column A that match a term in Column B
    By frsaxon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-29-2016, 07:22 AM
  4. Count number of all unique values down a column
    By nature718 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-13-2014, 08:47 PM
  5. [SOLVED] Assign single number to duplicate values in column
    By excelresumes in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-19-2013, 06:05 PM
  6. [SOLVED] Assign single number to duplicate values according to a column
    By DonAx in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 07-18-2013, 04:45 AM
  7. Replies: 3
    Last Post: 08-04-2011, 02:57 PM

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