Вот оно:
Option Explicit
Sub Warning()
Dim A As Long, B As Long, C As Long 'in case you have floating numbers use Single or Double instead
With ThisWorkbook.Sheets("NameOfYourSheet")
A = .Cells(.Rows.Count, "A").End(xlUp)
B = .Cells(.Rows.Count, "B").End(xlUp)
C = .Cells(.Rows.Count, "C").End(xlUp)
End With
If B + C <> A Then
MsgBox "Error, wrong number of sent goods"
End If
End Sub
Я предполагаю, что вы пробуете последний ряд каждого столбца.