+ Reply to Thread
Results 1 to 7 of 7

Counting consecutive cells in a row

  1. #1
    Forum Contributor her.rockstar's Avatar
    Join Date
    01-11-2013
    Location
    Saint John, NB
    MS-Off Ver
    Office 365
    Posts
    194

    Counting consecutive cells in a row

    I have a table that lists observations completed over the course of the year.
    If someone goes three consecutive months without completing an observation, I would like an "R?" to appear to the right of the table. (this will remind me to retire the person)

    One issue I can see is the months ahead of now (May-Dec) that are also empty may cause problems.
    I've attached the dummy sheet

    dummy7.xls

  2. #2
    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 cells in a row

    here is one way but i may have overthought it!
    Attached Files Attached Files
    Last edited by martindwilson; 04-04-2013 at 11:27 AM.
    "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

  3. #3
    Forum Contributor her.rockstar's Avatar
    Join Date
    01-11-2013
    Location
    Saint John, NB
    MS-Off Ver
    Office 365
    Posts
    194

    Re: Counting consecutive cells in a row

    Wow, it's almost exactly what I'm looking for, the issue I have is this:

    Currently the cut off date appears to be June, which I believe you have set there because it's three months (including April, May, June). Right? At this point in time, the only way it should show R is if "JAN FEB MAR APR" are blank, or if "FEB MAR APR" are blank. Anything after April should have no bearing, until.... next month it should shift up, so "JAN FEB MAR APR" blank will show R, and/or "FEB MAR APR" and/or "MAR APR MAY", etc. and so on. I know it's confusing.

    Does that make sense? Really great work though!

  4. #4
    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 cells in a row

    nope just put whats in o3 in o1 instead i just used june to test and since april hasnt ended should it be included? if it is then use
    =eomonth(TODAY(),1)+1 instead of =eomonth(TODAY(),-1)+1 the formula checks for any period of 3 consecutive months prior to date in O1
    Last edited by martindwilson; 04-04-2013 at 12:20 PM.

  5. #5
    Forum Contributor her.rockstar's Avatar
    Join Date
    01-11-2013
    Location
    Saint John, NB
    MS-Off Ver
    Office 365
    Posts
    194

    Re: Counting consecutive cells in a row

    Awesome!. .Thanks for your help!

  6. #6
    Forum Contributor her.rockstar's Avatar
    Join Date
    01-11-2013
    Location
    Saint John, NB
    MS-Off Ver
    Office 365
    Posts
    194

    Re: Counting consecutive cells in a row

    Okay, I understand what you did there, it works like you're saying.

    HOWEVER, I noticed that if I leave JAN FEB MAR blank and then put a 1 in APR, it still shows retired. I suppose I didn't mention this in my main post, so I'm very sorry. IF the person does an observation after 3 month period of no activity, the R should disappear, as they'd be considered active again.

  7. #7
    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 cells in a row

    no idea sorry
    Last edited by martindwilson; 04-04-2013 at 01:00 PM.

+ 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