Trying to sum a range of cells on different sheet, where the upper and lower rows changes. I'm getting a the syntax error "run-time error '1004': application-defined or object-defined error" for the following line of code:


total_inven_lbs = Application.WorksheetFunction.Sum(Sheets("batchDetails").Range(Cells(newRow_batchDetails, 8), Cells(latestBatchrow_batchDetails, 8)))

Been a few hours already trying to research and solve.

Thanks.