Sub UpdatePurchase()
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
With Sheets("Main")
.Range("I4:I4203").Formula = "=SUMIFS(Entry!$I$4:$I$65557,Entry!$F$4:$F$65557,Main!E4,Entry!$H$4:$H$65557,Heads!$B$4)"
.Range("J4:J4203").Formula = "=SUMIFS(Entry!$J$4:$J$65557,Entry!$F$4:$F$65557,Main!E4,Entry!$H$4:$H$65557,Heads!$B$4)"
.Range("L4:L4203").Formula = "=SUMIFS(Entry!$I$4:$I$65557,Entry!$F$4:$F$65557,Main!E4,Entry!$H$4:$H$65557,Heads!$B$5)"
.Range("M4:M4203").Formula = "=SUMIFS(Entry!$J$4:$J$65557,Entry!$F$4:$F$65557,Main!E4,Entry!$H$4:$H$65557,Heads!$B$5)"
.Range("O4:O4203").Formula = "=SUMIFS(Entry!$I$4:$I$65557,Entry!$F$4:$F$65557,Main!E4,Entry!$H$4:$H$65557,Heads!$B$6)"
.Range("P4:P4203").Formula = "=SUMIFS(Entry!$J$4:$J$65557,Entry!$F$4:$F$65557,Main!E4,Entry!$H$4:$H$65557,Heads!$B$6)"
.Range("I4:P4203").Calculate
With .Range("I4:P4203")
.Value = .Value
End With
End With
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub
Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
With Sheets("Main")
.Range("I4:I4203").Formula = "=SUMIFS(Entry!$I$4:$I$65557,Entry!$F$4:$F$65557,Main!E4,Entry!$H$4:$H$65557,Heads!$B$4)"
.Range("J4:J4203").Formula = "=SUMIFS(Entry!$J$4:$J$65557,Entry!$F$4:$F$65557,Main!E4,Entry!$H$4:$H$65557,Heads!$B$4)"
.Range("L4:L4203").Formula = "=SUMIFS(Entry!$I$4:$I$65557,Entry!$F$4:$F$65557,Main!E4,Entry!$H$4:$H$65557,Heads!$B$5)"
.Range("M4:M4203").Formula = "=SUMIFS(Entry!$J$4:$J$65557,Entry!$F$4:$F$65557,Main!E4,Entry!$H$4:$H$65557,Heads!$B$5)"
.Range("O4:O4203").Formula = "=SUMIFS(Entry!$I$4:$I$65557,Entry!$F$4:$F$65557,Main!E4,Entry!$H$4:$H$65557,Heads!$B$6)"
.Range("P4:P4203").Formula = "=SUMIFS(Entry!$J$4:$J$65557,Entry!$F$4:$F$65557,Main!E4,Entry!$H$4:$H$65557,Heads!$B$6)"
.Range("I4:P4203").Calculate
With .Range("I4:P4203")
.Value = .Value
End With
End With
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
End Sub