marcvanderpeet12
Member
Dear all,
I created a new module in which in inserted the following code:
Function Discount(quantity, price)
If quantity >= 100 Then
Discount = quantity * price * 0.1
Else
Discount = 0
End If
Discount = Application.Round(Discount, 2)
End Function
But now when i switch to my excel en try to call the code (=Discount(a1,a2)) i get an error. Do I make a mistake somewhere?
Dear regards,
Marc
I created a new module in which in inserted the following code:
Function Discount(quantity, price)
If quantity >= 100 Then
Discount = quantity * price * 0.1
Else
Discount = 0
End If
Discount = Application.Round(Discount, 2)
End Function
But now when i switch to my excel en try to call the code (=Discount(a1,a2)) i get an error. Do I make a mistake somewhere?
Dear regards,
Marc