I have 2 column Price, % of Total Price how do I get the value of % of total price using VBA.
I notice that there is no divide function for excel WorksheetFunction.Divide so how do I loop thru my price column to get the value and dividing against the total price to get the percentage?
Answer
=B53/$B$65
Should work.
In VBA
Dim x as Double
x = Range("B53").Value / Range("B64").Value
Just format the cell as percentage.
No comments:
Post a Comment