I'm in the process of trying get the sum of two products; inventory items X quantity.
But if the cell is left blank, then the cell ought to be blank, without any errors.
For example:
Function LineTotal(b As Currency, c As Integer, f As Currency, g As Integer)
If c > 0 "and" g > 0 Then
LineTotal = (c * b) + (g * f)
ElseIf c > 0 "and" g = "" Then
LineTotal = (c * b)
ElseIf c = "" "and" g > 0 Then
LineTotal = (g * f)
ElseIf c = "" "and" g = "" Then
LineTotal = ""
End If
End Function
Thanks,
Cris
Bookmarks