Dim col_A As Range, col_E As Range
Set col_A = Range(Cells(9, 1), Cells(18, 1))
Set col_E = Range(Cells(9, 5), Cells(18, 5))
If Cells(19, 4) <> "" Then
MsgBox Application.Min(Cells(19, 3), Cells(19, 4) - Application.SumIf(col_A, Cells(19, 1), col_E))
End If
Set col_A = Nothing
Set col_E = Nothing