I'm trying to sum the contents of columns in Sheet1 that are 6 cells apart (i.e. the first is G19:G28, the second is M19:M28) using a for loop to define the column value. So, I want the sum of the G column, the sum of the M column, and so on, but only if the column value is greater than 0. The sums are then assigned to consecutive cells in a sheet called 'Calculator.' This is what I have so far, but it is not working. Any help is appreciated!
For m = 1 To 20
totdamage = Application.WorksheetFunction.SumIf(Worksheets("Sheet1").Range(Cells(19, (6 *
m) + 1), Cells(28, (6 * m) + 1)), ">0", Worksheets("Sheet1").Range(Cells(19, (6 * m) +
1).Value, Cells(28, (6 * m) + 1).Value)):
Worksheets("Calculator").Cells(m + 6, 31).Value = totdamage
Next m