+ Reply to Thread
Results 1 to 3 of 3

How do i count the number of times a sequence appears in a row of data

  1. #1
    Registered User
    Join Date
    12-02-2014
    Location
    Dublin, Ireland
    MS-Off Ver
    2010
    Posts
    2

    How do i count the number of times a sequence appears in a row of data

    Hi Guys,

    I have a row of data that I am looking at for a roster. I want to count the number of times an employee has two days off in a row over a 28 day period.

    The rest days are referred to as "X" so realistically I am trying to count the occurrences where X appears twice in a row, 3 times in a row and also where it appears with no X the day before or the day after, so where the rest days are split.

    Once i have this sorted my aim would then to be to count the number of times an employee has worked 5 days on and then 2 rest days. I imagine once i get the solution to the above, that will then follow through.

    Any help would be appreciated.

    Thanks!

  2. #2
    Registered User
    Join Date
    03-16-2012
    Location
    MN
    MS-Off Ver
    Excel 2010
    Posts
    50

    Re: How do i count the number of times a sequence appears in a row of data

    Does each row have an employee identifier and then 28 columns - one for each of the 28 days?

    (Also, your use of "row" is confusing bc you say "I have a row of data" but you also say "two days off in a row")

  3. #3
    Registered User
    Join Date
    12-02-2014
    Location
    Dublin, Ireland
    MS-Off Ver
    2010
    Posts
    2

    Re: How do i count the number of times a sequence appears in a row of data

    Hi James,

    Sorry, by in a row, i mean twice in succession. i.e. Day 21 (Column V) would be a resting day ("X") and day 22 (Column W) would be a resting day ("X"). In column A is a list of all employees, upwards of 300 rows (one per employee), with 28 columns, one for each day.

    So if there is two days in a row that have "X", I want to count that as one instance of this sequence across the row.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Count the number of times an A appears 5 or more times consecutively
    By CCook310 in forum Excel Formulas & Functions
    Replies: 17
    Last Post: 10-02-2013, 04:02 PM
  2. Replies: 2
    Last Post: 10-11-2012, 02:54 PM
  3. How to count the number of times something appears?
    By Ipinho100 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-17-2012, 08:08 AM
  4. Replies: 5
    Last Post: 11-22-2010, 06:31 PM
  5. count the number of times data appears on the same row from two c.
    By GavT9 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-01-2005, 09:06 PM

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