title: VBA Round Function
body: <p>In one of my programs I need to calculate the average on a range of numbers.  The problem is that sometimes the answer comes out to a huge decimal and I need to try and get that down to two decimal places maximum.</p>
  
  <p>I've seen something called <code>Excel.WorksheetFunction.Round(...)</code> but as far as I know it only works with a specific number or a specific cell.  I was wondering if anyone knew how to implement this so that it will round all decimals in a range of cells.</p>
  
  <pre><code>Excel.WorksheetFunction.Round(ActiveSheet.Range(g_first_Function_Col &amp; "2:" &amp; g_first_Function &amp; g_totalRow).Select, 2)
  </code></pre>
  
  <p>The code above attempts to use the round function on a range of cells.  The g_first_Function_Col is some column (like column "H") and g_totalRow is the last row that has any values in it.  When I try to run this bit of code it tells me "=" expected.  Essentially I'm trying to select an entire column and round it.</p>
  
  <p>Thank you,</p>
  
  <p>Jesse Smothermon</p>