title: Strange formula behaviour
body: <p>I hope someone can help with this one. First some background.</p>
  
  <p>This is a link to a cut-down version of the spreadsheet I'm having problems with. Set to view only but you can copy it to play with.</p>
  
  <p><a href="https://docs.google.com/spreadsheets/d/1RRhvC3wk4FK5Hcb2LatK62sguS95ssxqGPHsnNQRDRM/edit?usp=sharing" rel="nofollow noreferrer">https://docs.google.com/spreadsheets/d/1RRhvC3wk4FK5Hcb2LatK62sguS95ssxqGPHsnNQRDRM/edit?usp=sharing</a></p>
  
  <p>The purpose of the sheet is to keep track of workers' start and end times for each day they are working, and show totals for each day, The sheet (Planner) is divided into departments/sections. Column C and rows 4 &amp; 5 are hidden in normal use.</p>
  
  <p>Looking at the first week, 15/1/2017, the totals after section 1 are all correct as expected. The line Total Early, shows the count for all workers who have a start time either on or before the time shown in the corresponding column in row 4. The line Total Late, shows the count for all workers who have an end time that is either on or after the time shown in the corresponding column in row 5. The line Total Day, shows a count for how many workers are in on that day regardless of when they start and finish.</p>
  
  <p>Looking at the second week, 22/1/2017, this is where is starts to get interesting. The counts for the Sunday, Monday, Thursday, Friday and Saturday are correct. The Total Late count for Tuesday and Wednesday is including the text entries in the count. This happens with several of the choices from the validation box, but not all. Strange! </p>
  
  <p>Looking at the week commencing 10/12/2017, it gets even more interesting! The Total Early count is totally screwed up showing 0 (zero)  and the Total Late count even more so, showing 9, which just happens to be the number of cells in the range, Its the same formula, so why the different behaviour?! </p>
  
  <p>The formula used in these cells has gone through many iterations but with the same or similar results. I'm totally stumped on this one so any help anyone can give would be gratefully received.</p>
  
  <p>Let me know if you have questions or need more info.
  Thanks.</p>