Excel Excel Macro formula when number of records may vary

Joined
Apr 19, 2010
Messages
1
Reaction score
0
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 = ?????
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top