title: Excel VBA 2010 - worksheet.subtotal function sum and average in the same row
body: <p>I am creating a macro which takes data from an Oracle database, which means that the number of rows can vary depending upon the result. In this macro, I am using the worksheet.subtotal function, which sums up on a number of columns when the group changes. This all works, but the problem that I am facing are that a few of the columns need to be average.</p>
  
  <p>Searching around I have not been able to find a solution where you can have both average and sum in the same row. I do not wish to have a situation where the user has to manually intervene to change each column for each group.</p>
  
  <p>Is there away where you can have both average and sum in the same row?</p>