Not sure how to adjust code to copy from one sheet and paste results on another.
Sub loop4()
'with dynamic range
'dynamic Range (vertical only and horizontal)
'get last used Row
iLastUsedRow = Range("B3").End(xlDown).Row
dateCol = 3
For col = 9 To 12
For r = 3 To 5
'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
Sub loop4()
'with dynamic range
'dynamic Range (vertical only and horizontal)
'get last used Row
iLastUsedRow = Range("B3").End(xlDown).Row
dateCol = 3
For col = 9 To 12
For r = 3 To 5
'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