title: Excel workbook causes Excel to crash when opening another workbook - 4 contributing factors identified but actual cause unknown
body: <p>I've encountered an unusual bug in Excel that results in the whole programme crashing without warning, any form of error notification (including upon startup), or any acknowledgement that it crashed. This occurs when I have a particular workbook open and then I try to open another one; at this point Excel effectively just 'end task's itself.</p>
  <p>I've played around with a copy of the workbook at fault and seem to have narrowed it down to a combination of four factors. If any of these factors are removed the bug doesn't appear to occur, and creating them in a fresh workbook seems to cause the issue to occur (i.e. it's replicable and not just that specific original workbook).</p>
  <p>These four factors are as follows:</p>
  <p>Factors 1 &amp; 2 are on a cell (let's say B2; but see my additional notes) that contains a date:</p>
  <ul>
  <li><p><strong>Factor 1</strong>: A conditional formatting rule with the formula: <code>=NOT(OR(CheckIfDate($B2),$B2=&quot;&quot;))</code> (the CheckIfDate function is covered in Factor 4)</p>
  </li>
  <li><p><strong>Factor 2</strong>: A conditional formatting rule with the formula: <code>=AND($B2-TODAY()&gt;1,$B2-TODAY()&lt;=10)</code></p>
  </li>
  <li><p><strong>Factor 3</strong>: Another cell (let's say C2; but again, see my additional notes) that contains the formula <code>=IF($B2=&quot;&quot;,&quot;&quot;,IF($B2-TODAY()&lt;=1,5,IF($B2-TODAY()&lt;=10,4,IF($B2-TODAY()&lt;=30,3,IF($B2-TODAY()&lt;=90,2,1)))))</code></p>
  </li>
  <li><p><strong>Factor 4</strong>: A VBA function with the following code:
  <code>Option Explicit   Function CheckIfDate(Test_Cell as Range) as Boolean   CheckIfDate = IsDate(Test_Cell)   End Function</code></p>
  </li>
  </ul>
  <p>At this stage I could probably tweak 1+ of the factors to avoid the bug, but I'm keen to understand what's going on before deciding what the best course of action going forward is. Any help/support would be greatly appreciated, and I'm happy to provide additional information, etc. if needed.</p>
  <p><em><strong>Additional notes:</strong></em></p>
  <ul>
  <li><p>I can confirm that this is not machine specific (I was able to replicate the issue on a colleague's machine)</p>
  </li>
  <li><p>It appears that this bug either doesn't impact all versions of Excel, or could even be specific to the one in question. The one being used is a <strong>32-bit Office Professional Plus 2016 version (build number is 16.0.5254.1000)</strong>. I tried to replicate it on a 64-bit 365 version (build number 16.0.14729.20254) and that seemed to work without issue; thus making me think the issue might be tied to 32-bit limitations?</p>
  </li>
  <li><p>In terms of the two mentioned cell locations, there seems to be some weak link between their location and the issue occurring. I was able to determine that when they were next to each other like in my example, the issue occurs, but that when they get further apart the issue seems not to trigger. I've not yet determined how far the 'trip' point is so to speak; but it appears there can be a couple of columns and/or rows between them and the issue still occurs (thus it's not a case of &quot;they have to be directly next to each other&quot;)</p>
  </li>
  <li><p>My initial thoughts when trying to nail down exactly what factors contributed the bug was that it would be related to the fact that TODAY() is a volatile function and it's used quite heavily here. But given <strong>Factor 1</strong> doesn't include that function I'm not so sure anymore. However, the obvious link between the 4 factors is that they all relate to dates in some shape or form; but that may be coincidental.</p>
  </li>
  </ul>