Hello, Masters!
I need your help to get a code for a report I receive every month.
In this report on column CU I have all costs of a certain product and I need to sum them up from cell CU8 until the last row with data; Then I need to get the result of that sum to another sheet named "Hotel Costs" on cell B2.
I have came up to this so far, but it only sum the CU8 to the last row, but I cannot figure out how to copy that to the other sheet:
Sheets("Hotel").Activate
Range("CU" & Rows.Count).End(xlUp).Offset(2, 0).FormulaR1C1 = "=SUM(R8C:R[-2]C)"
LastRow = Cells(Rows.Count, 1).End(xlUp).Row
Please keep in mind that the report will never have a fixed last row.
If there is another way to do that I am happy to use it as well!
Thanks!
I need your help to get a code for a report I receive every month.
In this report on column CU I have all costs of a certain product and I need to sum them up from cell CU8 until the last row with data; Then I need to get the result of that sum to another sheet named "Hotel Costs" on cell B2.
I have came up to this so far, but it only sum the CU8 to the last row, but I cannot figure out how to copy that to the other sheet:
Sheets("Hotel").Activate
Range("CU" & Rows.Count).End(xlUp).Offset(2, 0).FormulaR1C1 = "=SUM(R8C:R[-2]C)"
LastRow = Cells(Rows.Count, 1).End(xlUp).Row
Please keep in mind that the report will never have a fixed last row.
If there is another way to do that I am happy to use it as well!
Thanks!