View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default #NAME? error in function

You have to tell excel where to find it:

=personal.xlsb!ROP(100,.5,.5)

Another option would be to save your personal workbook as an addin. Then excel
will find it (if you continue to have excel open it when excel starts).

Michael Smith wrote:

Thanks Dave, below is my corrected UDF, it's saved in Module1 in modules
folder under VBAproject(PERSONAL.XLSB)
I then go into any open workbook and type into a cell
=ROP(100,.5,.5)

Function ROP(Usage, LeadTime, SafetyStock)
Value = (Usage / 12 * LeadTime) + (Usage / 12 * SafetyStock)
ROP = Round(Value - (CLng(Value) < Value))
End Function

*** Sent via Developersdex http://www.developersdex.com ***


--

Dave Peterson