Solved

Create DATEDIF as a User Defined Function in Excel 2010

Posted on 2013-01-27
3
533 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 92

Accepted Solution

by:
Patrick Matthews earned 500 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

685 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