Closed Thread
Results 1 to 13 of 13

Count the number of consecutive occurrences

Hybrid View

  1. #1
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by timmycl_7 View Post
    Hi,

    As I mentioned I have used NBVC's formula and it works to what I described, however I have realise that I had an oversight when describing what I required.

    An employee could be off 28 calendar days but only 16 of those days would be counted as working days because they work a 4 day week. If I was to enter the word "OFF" could the formula be amended to still count absent days consecuatively if the work "OFF occurs in between it?

    Sorry, thanks in advance!
    Try:
    =SUM(IF(FREQUENCY(IF((A1:A1000="Absent")+(A1:A1000="OFF"),ROW(A1:A1000)),IF(A1:A1000="",ROW(A1:A1000)))=28,1))
    adjusting ranges again and confirming with CTRL+SHIFT+ENTER
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  2. #2
    Registered User
    Join Date
    03-12-2008
    Posts
    36
    NBVC,

    Thanks for your help, I think I have got the formula working now. I used the first formula you gave me making some slight adjustments.

    Thanks

  3. #3
    Registered User
    Join Date
    11-09-2008
    Location
    South Africa
    Posts
    14

    Re: Count the number of consecutive occurrences

    Hi there!

    I don't know if you are still at this address but here's trying.

    Could you please forward me your spreadsheet and maybe just an explanation on how you use/d it? I have been tasked to look at absenteeism and using the Bradford Index although we are looking at a period of 26 weeks in which the absenteeism takes place and it seems what you did will help me a great deal.

    Thanking you in advance,
    Rennier
    South Africa

  4. #4
    Registered User
    Join Date
    04-11-2012
    Location
    Sierra Vista, AZ
    MS-Off Ver
    Excel 2003
    Posts
    4

    Question Re: Count the number of consecutive occurrences

    morning,

    I have a question that is somewhat related to the above. I have values in several columns, each value can only occur once per row. I'm trying to find out two things:
    1/ what is the longest consecutive occurrence by a particular value, say '23' within a certain date range;
    2/ what are the top 3 (or 5) consecutive occurrences by any value within the same date range.

    In other words, what I need to find out is this: 'the number 23 has occurred 7 times consecutively from 1-Mar-09 through whatever (dates are in the column A). And the longest consecutive occurrences have been made by numbers 'x', which has occurred so many times, from such and such date through such and such date. The next number that did this, was 'y', which occurred some many times, etc, etc.

    any help is appreciated,

    thanks,

    L

Closed 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