+ Reply to Thread
Results 1 to 2 of 2

Custom function #VALUE error

  1. #1
    Registered User
    Join Date
    12-21-2009
    Location
    Cincinnati, OH
    MS-Off Ver
    Excel 2007
    Posts
    4

    Custom function #VALUE error

    ** Originally posted within worksheet formulas subcategory, but I later discovered that most of the threads in that subcategory deal with built-in Excel formulas. I am therefore re-posting here.

    Hello,
    I'm fairly new to VBA programming, and very new to creating custom functions. The function I'm trying to create would apply the TDIST worksheet function to the result of a series of calculations. Four arguments would be needed to feed the series of calculations.

    The code I have been using below results in the #VALUE! error.

    As far as I can tell, the formulas for the interim calculations are correct, although there could very well be errors in my code that attempts to make those calculations.

    Any help would be appreciated. Thanks in advance.



    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor JeanRage's Avatar
    Join Date
    03-02-2009
    Location
    Nice, France
    MS-Off Ver
    Excel 2003
    Posts
    705

    Re: Custom function #VALUE error

    Hi,

    Just replace
    sediffs = Sqr(pbar * (1 - pbar)) * (1 / base1 + 1 / base2)
    by
    sediffs = ((pbar * (1 - pbar)) * (1 / base1 + 1 / base2))^(1/2)
    HTH

+ 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