View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Michael Smith Michael Smith is offline
external usenet poster
 
Posts: 77
Default #NAME? error in function

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 ***