Hi
This syntax is wrong. sSh is not a method or a property of AWB.![]()
AWB.sSh.Range("A8:A" & lastRow)
If you defined sSh as a worksheet in workbook AWB, use instead:
This should work. If it doesn't please post the initialisation of AWB and sSh.![]()
cell.Offset(0, 3) = Application.WorksheetFunction.SumIf(sSh.Range("A8:A" & lastRow), cell.Value, sSh.Range("G8:G" & lastRow))
Bookmarks