Mohon bantuan nya Suhu hasil penjumlahan dari sumif tidak terisi semua sesuai kreteria
rumus nya seperti ini
Sub JumlahPagu()
Application.Calculation = xlCalculationManual
Dim BarisTerakhir As Long
Dim iRow As Long
Dim i As Long
Dim SumberData As Worksheet
Dim Target As Worksheet
Dim Total As Double
Set SumberData = ThisWorkbook.Sheets("DATAPAGUANGGARAN")
Set Target = ThisWorkbook.Sheets("RekapData")
BarisTerakhir = Target.Cells(Rows.Count, 2).End(xlUp).Row 'cari baris terakhir
'iRow = SumberData.Cells(Rows.Count, 2).End(xlUp).Row
' rumus sumif
For i = 6 To BarisTerakhir
iRow = SumberData.Cells(Rows.Count, 2).End(xlUp).Row
Total = 0
' Akun
If Target.Cells(i, 2).Value = SumberData.Cells(iRow, 5).Value Then
Total = Total + WorksheetFunction.SumIf(SumberData.Range("E:E"), Target.Cells(i, 2).Value, SumberData.Range("M:M"))
End If
' Kelompok
If Target.Cells(i, 2).Value = SumberData.Cells(iRow, 6).Value Then
Total = Total + WorksheetFunction.SumIf(SumberData.Range("F:F"), Target.Cells(i, 2).Value, SumberData.Range("M:M"))
End If
' Jenis
If Target.Cells(i, 2).Value = SumberData.Cells(iRow, 7).Value Then
Total = Total + WorksheetFunction.SumIf(SumberData.Range("G:G"), Target.Cells(i, 2).Value, SumberData.Range("M:M"))
End If
' Objek
If Target.Cells(i, 2).Value = SumberData.Cells(iRow, 8).Value Then
Total = Total + WorksheetFunction.SumIf(SumberData.Range("H:H"), Target.Cells(i, 2).Value, SumberData.Range("M:M"))
End If
' Rincian Objek
If Target.Cells(i, 2).Value = SumberData.Cells(iRow, 9).Value Then
Total = Total + WorksheetFunction.SumIf(SumberData.Range("I:I"), Target.Cells(i, 2).Value, SumberData.Range("M:M"))
End If
' Sub Rincian Objek
If Target.Cells(i, 2).Value = SumberData.Cells(iRow, 10).Value Then
Total = Total + WorksheetFunction.SumIf(SumberData.Range("J:J"), Target.Cells(i, 2).Value, SumberData.Range("M:M"))
End If
Target.Cells(i, 4).Value = Total
Next i
Application.Calculation = xlCalculationAutomatic
End Sub
apakah ada yang salah rumus diatas mohon bantuan nya