Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Create DATEDIF as a User Defined Function in Excel 2010

Posted on 2013-01-27
3
Medium Priority
?
582 Views
Last Modified: 2013-01-27
I know how to use DATEDIF in Excel.
I would like to create a User Defined Function for DATEDIF
0
Comment
Question by:mnoisette
3 Comments
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 38824224
Is this homework?
0
 

Author Comment

by:mnoisette
ID: 38824299
No, a project. I use the formula all the time. Would be easier to use as a UDF.
0
 
LVL 93

Accepted Solution

by:
Patrick Matthews earned 2000 total points
ID: 38824312
With respect, I think this is a very, very bad idea.

Assuming that you are putting your DateDif UDF into the current workbook, then to use the UDF and not the native Excel function, you have to qualify the function call with the module name:

=Name_of_module.DateDif(<arguments>)

I fail to see how that is an improvement.  You should just use a different name for your UDF.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question