Results 1 to 9 of 9

How to count the number of cells before a condition is met?

Threaded View

  1. #1
    Registered User
    Join Date
    03-25-2016
    Location
    belgium
    MS-Off Ver
    Office 2010
    Posts
    4

    How to count the number of cells before a condition is met?

    Hi guys,

    I have a nice little problem that I cannot seem to get my head around. Say I have sales data of a product that doesn't sell every day. For instance, in Column A of the attachment, you will find some rows with a positive number but many rows with zeros. In the attachment, I let each row represent a separate date (with the same time interval per row).

    I would like to add a column describing the number of rows it takes to get to the previous sales day with non-zero sales. But I have no clue which formula to use for it. I could use a progressive series of IF statements but this is ugly.
    I have hardcoded the desired result in column B, labeled "intervals".

    Any help is much appreciated!
    Thanks,
    Stuart
    Attached Files Attached Files
    Last edited by svb08; 03-25-2016 at 02:05 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Count number of days according to a condition
    By tsakta13ole in forum Excel General
    Replies: 5
    Last Post: 10-06-2015, 08:41 AM
  2. count the number in if condition is met
    By chriskhan90 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-30-2015, 06:35 AM
  3. Replies: 2
    Last Post: 05-20-2015, 08:26 AM
  4. [SOLVED] Formula to count number of blank cells for a specific condition in another column
    By Daniel_12 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-30-2013, 07:16 AM
  5. [SOLVED] count number of cells which meet a particular condition for an individual
    By rohit43 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-18-2013, 11:20 AM
  6. count the number of cells if condition satisfy
    By rosh@excel in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-22-2012, 10:09 AM
  7. [SOLVED] how 2 Count number of cells that have specific condition format?
    By daveydavey in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-04-2005, 10:06 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