Results 1 to 4 of 4

Thread: Create user defined functions in Excel 2007

  1. #1
    Join Date
    Jun 2009
    Posts
    404

    Create user defined functions in Excel 2007

    I am having Microsoft Office 2007 on my Windows Vista computer. I am currently working on creating a macro in Excel. Since I new to macros and also to coding I need some help in creating a custom user defined functions rather than using the pre-defined functions available in Excel. Can you help me how to create the user defined functions in Excel?

  2. #2
    Join Date
    May 2008
    Posts
    913

    Re: Create user defined functions in Excel 2007

    A macro is nothing but a series of commands and functions that are used to perform a specific task. A macro can be called by either manually or when an event occurs. You can create your own functions based on your requirements using inbuilt formulas in Excel. A user defined function always begins with "FUNCTION" keyword.

  3. #3
    Join Date
    Apr 2008
    Posts
    4,088

    Re: Create user defined functions in Excel 2007

    Here are the steps for creating User Defined Functions in Excel 2007:

    1. Open up a new workbook.
    2. Get into VBA (Press [Alt] + F11)
    3. Insert a new module (Insert -> Module)
    4. Define your function and determine what all things it should do when it is called
    5. Get out of VBA (Press [Alt] + Q)
    6. Use the functions (You will find it in the Paste Function dialog box, [Shift] + F3, under the "User Defined" category)

  4. #4
    Join Date
    May 2008
    Posts
    979

    Re: Create user defined functions in Excel 2007

    Limitations of user defined functions (UDF) in Excel 2007

    It can be sealed but cannot be abstract, internal, or private. It must have a parameterless, public constructor. The UDF method must be thread-safe. The UDF method must also have a supported return type (Numeric types: Double, Single, Int32, UInt32, Int16, UInt16, Byte, Sbyte; String; Boolean; Object arrays: one- or two-dimensional arrays; DateTime; Object). A UDF method cannot have:
    • ref or out parameters
    • retval attributes
    • Optional arguments
    • unsupported data types


    You cannot "record" an Excel UDF like you can do with an Excel macro.

Similar Threads

  1. Cut and Format Painter functions don't work in Excel 2007
    By Miko33 in forum Windows Software
    Replies: 2
    Last Post: 22-03-2012, 04:56 PM
  2. Need help to create a login user form in Microsoft Excel
    By Henriksen in forum MS Office Support
    Replies: 2
    Last Post: 23-02-2012, 06:04 PM
  3. How to create user-defined service on Windows XP
    By killerboy in forum Operating Systems
    Replies: 2
    Last Post: 31-07-2009, 11:37 PM
  4. How to study Functions in Excel 2007?
    By Scaramouche in forum Windows Software
    Replies: 4
    Last Post: 05-06-2009, 03:05 PM
  5. When to create User Defined Data Type in VB.Net
    By Nihar Khan in forum Software Development
    Replies: 3
    Last Post: 27-02-2009, 11:29 AM

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
  •  
Page generated in 1,714,062,407.28762 seconds with 17 queries