+ Reply to Thread
Results 1 to 14 of 14

Instances that occur in a sequence

Hybrid View

  1. #1
    Registered User
    Join Date
    03-12-2008
    Posts
    36

    Instances that occur in a sequence

    Hi,

    I have a problem, I have a formula which counts the number of instances that occur and assigns the value as 1 for every instance, however I want the formual to also recognise that if a number of instances occur in succession a value of 1 should also be assigned.

    Is this possible?

    E.g. if a person is absent for 1 day the formula assigns a value of 1
    if a person is off for 3 days in succession the formula assigns a value of 1


    Regards

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Can you show the data setup and the current formula used?
    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.

  3. #3
    Registered User
    Join Date
    03-12-2008
    Posts
    36
    The sheet is used as a work schedule as well. 9 Column headings -

    Date, Shift1, Shift2 etc

    The employees initials are entered into the field according to when they are supposed to be working. The spreadsheet is updated daily, if an employee is sick, the employees intials + sick are enterd. Currently I have just used a countif formula to count the number of times every instance of (Employee Initials)+sick.

    I would say changnig the structure of the table might not be an option as I have not designed the table.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    I would like to see a sample if possible...Zipped XL spreadsheet.

  5. #5
    Registered User
    Join Date
    03-12-2008
    Posts
    36
    Sorry,

    I have attached a sample this time. Sheet 1 contains the information and sheet 2 contains my formula. In the example PY is off 4 consective days. I want this to be counted as 1. Also CM was sick 1 day, I also want this to be counted as 1. I'm trying to count the number of occasions rather than the number of days.

    Thanks
    Attached Files Attached Files

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    See attached....

    I added 5 helper rows (1 for each shift)... you can hide these if you wish.

    These helper rows calculate the counts of singles and groups of 3 or more "sick" for each shift. Note these are array formulas... if you edit them you have to confirm them with CTRL+SHIFT+ENTER not just ENTER so that the { } brackets appear around the formula.

    Then you just sum these up in your summary.
    Attached Files Attached Files

+ 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