+ Reply to Thread
Results 1 to 5 of 5

Convert Array Formula into VBA User Defined Function

  1. #1
    Registered User
    Join Date
    03-25-2013
    Location
    China
    MS-Off Ver
    Excel 2003
    Posts
    3

    Question Convert Array Formula into VBA User Defined Function

    I want to convert the below count & if function into a user defined function. However, its outcome is false. What's wrong with it? Can someone helps?? Thanks in advance!

    Please Login or Register  to view this content.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Convert Array Formula into VBA User Defined Function

    that function only tests if the current selection contains the formula specified in the code. you need to use evaluate if you want to actually calculate that formula but I am not sure what the benefit of the udf is-the formula in the cell would be more efficient
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Registered User
    Join Date
    03-25-2013
    Location
    China
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Convert Array Formula into VBA User Defined Function

    Thanks Joseph! The reason is I want to hide my calculation. I have to let the user to know the raw data but cannot let them know to calculate it!

    I have changed my code but the outcome is still "FALSE". Are there any problems?

    Please Login or Register  to view this content.

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Convert Array Formula into VBA User Defined Function

    yes-the code is wrong and the formula makes no sense. what is the formula supposed to do?

  5. #5
    Registered User
    Join Date
    03-25-2013
    Location
    China
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Convert Array Formula into VBA User Defined Function

    The code is obtained from Macro recording but it doesn't work in module.

    I want to use a User defined function to replace the formula in the spreadsheet "Master Table" of the attached file.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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