C
caveman.savant
I have a UDF that calculates the percentage of a value (rVal) based on
a sum of similar values (rTot).
It returns a value multipled by another value (rTarg) and rounded.
Function FigurePert(rTot As Integer, rVal As Integer, rTarg) As
Variant
xx = (rVal / rTot)
FigurePert = Round(xx * rTarg, 0)
End Function
I would like rTot be the value of a given range that the user chooses
by a defined Name or selected.
a sum of similar values (rTot).
It returns a value multipled by another value (rTarg) and rounded.
Function FigurePert(rTot As Integer, rVal As Integer, rTarg) As
Variant
xx = (rVal / rTot)
FigurePert = Round(xx * rTarg, 0)
End Function
I would like rTot be the value of a given range that the user chooses
by a defined Name or selected.