Hi,
I wrote below vba code to do sumifs calculation in attached sample sheet. However its returning "Run-Time Error 424 Object Required" error. I cant figure out whats causing the error. Can anyone help me ? Thanks
I wrote below vba code to do sumifs calculation in attached sample sheet. However its returning "Run-Time Error 424 Object Required" error. I cant figure out whats causing the error. Can anyone help me ? Thanks
Code:
Sub SUMIFS()
Dim i As Variant
Dim condition As Range
For i = 1 To 8
HDD.Cells(i, 7) = WorksheetFunction.SumIfs(Source.Range("av3:av"), Source.Range("cb:cb"), HDD.Cells(i, 5), Source.Range("CF:CF"), HDD.Cells(i, 6))
HDD.Cells(i, 8) = WorksheetFunction.SumIfs(Source.Range("aw3:aw"), Source.Range("cb:cb"), HDD.Cells(i, 5), Source.Range("CF:CF"), HDD.Cells(i, 6))
Next i
End Sub