title: Number Format with Thousands Separator and Decimal if Necessary
body: <p>I'm trying to create a custom format such that the number will be displayed with commas as the thousands separator. Where I am struggling to find a solution (both through trial and error as well as searching) <em>with a decimal point if</em> the number has one, but <em>without a decimal point</em> if the number is whole.</p>
  
  <p>Here's what I would like to achieve:<br>
  - "123" displays as "123"<br>
  - "1234" displays as "1,234"<br>
  - "1234.5" displays as "1,234.5"<br>
  - "1234.56" displays as "1,234.56"<br>
  - "1234.567" displays as "1,234.57"</p>
  
  <p>Here's what I have tried so far, to no avail:</p>
  
  <pre><code>Print Format(1234, "Standard") 'Displays "1,234.00"
  Print Format(1234, "#,###.##") 'Displays "1,234."
  </code></pre>
  
  <p>These are not the desired results, as it unnecessarily displays the decimal. How can I access the decimal point when needed, and avoid when not, all while having the thousands separator?</p>