title: EXCEL: How do I count a pattern of values across multiple cells?
body: <p>I have an attendance spreadsheet with values "OFF", "VAC", "HOL" and "SCK".  I am trying to identify abuse of the SICK day policy where employees use their SICK days to extend their weekends, vacation or holidays.  I would like to count the number of time these two text values are <em>within four cells</em> of each other in the same row a large range.</p>
  
  <p><img src="https://i.stack.imgur.com/thcFs.jpg" alt=""></p>
  
  <p>In this example, the count would yield an answer of "3" because there are 3 occurrences where the employee was SICK immediately before or after an "OFF" day.</p>
  
  <p>Is this possible in a formula?</p>