View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
caveman.savant caveman.savant is offline
external usenet poster
 
Posts: 31
Default User Defined Range

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.