Solved

Create DATEDIF as a User Defined Function in Excel 2010

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

A2 = A1 That kind of cell reference is relative.  If you copy it from A2 to B2, then B2 will get this: B2 = B1 That's all fine and good, but if you then insert a new row above row 2, you'll find: A3 = A1 B3 = B1 This is intentional. …
Dealing with unintended Excel Active-X resizing quirks (VBA code simulates "self correction") David Miller (dlmille) Intro Not everyone is a fan of Active-X controls in spreadsheets (as opposed to the UserForm approach, the older Form controls …
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

759 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now