Simple User-Defined Function

JonElCanche

Board Regular
Joined
Aug 25, 2011
Messages
59
I have created a UDF to calculate the Economic Order Quantity with the given inputs being Annual Demand, Order Costs, and Holding Costs. The formula works because I know the required inputs, but in Excel if i use the formula, =EOQ(, it allows me to enter inputs but does not say what inputs are required. I would like it to act as the DATE formula for example, prompting the user for the year, month, day. Below is the code in the module:

Code:
Function EOQ(AnnualDemand, OrderCost, HoldingCost)

    EOQ = Sqr(2 * AnnualDemand * OrderCost / HoldingCost)
    
     
      
End Function
[code]


-- removed inline image ---
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
If you are using excel 2010 you might want to look at "Application.MacroOptions"

It can provide help only if the user uses the insert function dialogbox
 
Upvote 0
Just to clarify, I would like my UDF to pop up and display the inputs required like in the=sum function, number1,number2...
-- removed inline image ---
 
Upvote 0
You can't get a UDF to show tooltips like native functions do. I think the possible options have all been suggested.
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,153
Members
452,891
Latest member
JUSTOUTOFMYREACH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top