+ Reply to Thread
Results 1 to 3 of 3

Use formula to create a User Defined Function

  1. #1
    Registered User
    Join Date
    05-15-2013
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    7

    Use formula to create a User Defined Function

    Hi,

    I am currently using the formula below to convert an american date which is in a text format into a English date. With the formula below in mind, in my spreadsheet the American date would exist in A2 and I would convert it in B2.

    =IFERROR(VALUE(TEXT(A2,"mm/dd/yyyy")),VALUE(MID(A2,FIND("/",A2,1)+1,(FIND("/",A2,FIND("/",A2,1)+1)-FIND("/",A2,1)-1))&"/"&LEFT(A2,FIND("/",A2,1)-1)&"/2013"))

    This is an example of the American date TEXT format - 1/22/2013 12:00:00 AM

    And it is converted to this English DATE format - 22/01/2013

    What I want to do is instead of using this formula, I want to create a Public Custom Function called ConvertDate. I want to be able to type =ConvertDate(A2) in cell B2 and it return the same as the formula does.

    How can I incorporate this formula into a custom function?

    Any help is much appreciated!

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Use formula to create a User Defined Function

    The formula can be simplified if you show the sample date's in excel.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Use formula to create a User Defined Function

    I'd imagine you could use this:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] User Defined Function To Add A Zero In A Concatenated Formula
    By BanburyS in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-29-2012, 02:23 AM
  2. How do I create a user-defined function in Excel 2011?
    By dpbsmith in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-22-2012, 06:26 PM
  3. VBA/Excel - how do I create a user-defined function out of a makro?
    By marasmussen in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2007, 08:21 PM
  4. How to write a formula with a user defined function
    By reteid2222 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-23-2006, 02:30 PM
  5. How can I create a user defined function in excel?
    By Martinj in forum Excel General
    Replies: 4
    Last Post: 08-20-2005, 02:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1