+ Reply to Thread
Results 1 to 5 of 5

Excel 2007 : Counting consecutive blank cells for multiple rows from various starting points

  1. #1
    Registered User
    Join Date
    07-03-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    2

    Counting consecutive blank cells for multiple rows from various starting points

    I have a series of data that includes months going across the columns and in the rows are accounts. The cells are populated with the amount of sales for each account during each month. I am trying to find a formula to quickly note which accounts have more than six month of inactivity or "0" sales. However, the catch is that I need the search to begin with the first month that each account begins its sales. For example, one account can have its data beginning in March and another account can have its sales start in June. I need the search of consecutive 0 value cells to start from each account's first month of sales. The formula should return a value, such as "0" for accounts that do not have 6 consecutive months of 0 sales at any point since their first month of sales or "1" for accounts that do have 6 consecutive months of 0 sales at any point since their first month of sales. I've included a sample attachment. Thanks!
    Attached Files Attached Files
    Last edited by JMcC421; 07-05-2012 at 08:19 AM.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Counting consecutive blank cells for multiple rows from various starting points

    JMcC421,

    Welcome to the forum!
    Easiest way I know of to do that would be to use helper columns (which can be hidden). Attached is a modified version of your posted workbook.

    In cell AA2 and copied over and to AQ2, and then copied down for the number of rows with data (so down to row 11) is this formula:
    Please Login or Register  to view this content.

    That formula will finds all consecutive 0's after the first month with a value.
    Then, to determine if there are 6 consecutive 0's, in cell S2 and copied down is this formula:
    Please Login or Register  to view this content.

    Does that work for you?
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Counting consecutive blank cells for multiple rows from various starting points

    this might wotk but i haven't tested all conditions just all those i could think of
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Registered User
    Join Date
    07-03-2012
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Counting consecutive blank cells for multiple rows from various starting points

    Thank you so much! That looks like it works! And has just saved me tons of time!!

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Counting consecutive blank cells for multiple rows from various starting points

    If that takes care of your need, please select Thread Tools from menu above and set this topic to SOLVED.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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