Reputation: 295
I am writing code within a worksheet (using a private sub) and I want to divide two numbers. Is there a way to use this code?
Can.Range("AB4") = Application.WorksheetFunction.Quotient(.Max(Price, POS))
Thanks,
Griffin
Upvotes: 1
Views: 705
Reputation:
To divide maximum price by pos,
with Application.WorksheetFunction
Can.Range("AB4") = .Quotient(.Max(Price), POS)
end with
Upvotes: 1
Reputation: 13386
if you want to divide price
by pos
, just use:
Can.Range("AB4") = Application.WorksheetFunction.Quotient(Price, pos)
as you probably know, Quotient "Returns the integer portion of a division."
if you want to return the result of the division then use:
Can.Range("AB4") = Price/pos
Upvotes: 2