I am importing a set of records created monthly and then running a macro to do formatting and calculations. There are a different number of records each month. The macro creates a total row at the end and sums each column using a variable set as LastRow.
Then I need to add a row which shows an amount calculated using the totals. If the totals were on row 55 the formula would be SUM(G55-(C55-E55)).
This is what I have so far for this piece:
Range("A65536").End(xlUp).Cells(2, 1).Select
ActiveCell.FormulaR1C1 = "Total Minutes Not Used"
Range("C65536").End(xlUp).Offset(1, 0).FormulaR1C1 = ?????
Then I need to add a row which shows an amount calculated using the totals. If the totals were on row 55 the formula would be SUM(G55-(C55-E55)).
This is what I have so far for this piece:
Range("A65536").End(xlUp).Cells(2, 1).Select
ActiveCell.FormulaR1C1 = "Total Minutes Not Used"
Range("C65536").End(xlUp).Offset(1, 0).FormulaR1C1 = ?????