Sub is working great, but not sure how to adjust it to select criteria from sheet CDR with column "C" being the criteria and column "N" the numbers to sum.... posting results on Sheet Results.
Also can anyone explain this sub.... (the different parts) I may need to make some adjustments but not sure what all needs adjusted....
Currently adjusting the dateCol=, For col =, For r =, and seems to work
Thanks
Nate
Sub loop4()
'with dynamic range
'dynamic range (vertical only)
'Get Last used Row
iLastUsedRow = Range("B3").End(xlDown).Row
dateCol = 5
For col = 9 To 9
For r = 3 To 8
'Cells(r,col).FormulaR1C1= "=SUMIFS(R3C3:R16C3, R3C2:R16C2, R3C" & col & ")"
Cells(r, col).FormulaR1C1 = "=SUMIFS(R3C" & dateCol & ":R" & iLastUsedRow & "C" & dateCol & ", R3C2:R" & iLastUsedRow & "C2, R" & r & "C8)"
Next r
dateCol = dateCol + 1
Next col
End Sub
Also can anyone explain this sub.... (the different parts) I may need to make some adjustments but not sure what all needs adjusted....
Currently adjusting the dateCol=, For col =, For r =, and seems to work
Thanks
Nate
Sub loop4()
'with dynamic range
'dynamic range (vertical only)
'Get Last used Row
iLastUsedRow = Range("B3").End(xlDown).Row
dateCol = 5
For col = 9 To 9
For r = 3 To 8
'Cells(r,col).FormulaR1C1= "=SUMIFS(R3C3:R16C3, R3C2:R16C2, R3C" & col & ")"
Cells(r, col).FormulaR1C1 = "=SUMIFS(R3C" & dateCol & ":R" & iLastUsedRow & "C" & dateCol & ", R3C2:R" & iLastUsedRow & "C2, R" & r & "C8)"
Next r
dateCol = dateCol + 1
Next col
End Sub