+ Reply to Thread
Results 1 to 5 of 5

Is it possible to improve the functions UDF

  1. #1
    Registered User
    Join Date
    08-30-2008
    Location
    israel
    Posts
    61

    Is it possible to improve the functions UDF

    Hello everyone ,

    These functions built a few years ago, can improve them?
    These functions calculate the option prices.
    They call and put options , computers all options in range,
    I work with Excel 2010.

    Functions are red font.

    Thank you ! G.xlsm

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,588

    Re: Is it possible to improve the functions UDF

    A little shorter, but not much in it. Uses x as the OptQnt index rather than using a separate counter that needs to be incremented.

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    08-30-2008
    Location
    israel
    Posts
    61

    Re: Is it possible to improve the functions UDF

    Hi TMS ,

    Thanks for your help !

    If I give up on multifly , and enclose it in a cell on a sheet, is that it is better in terms of speed?

    Better to use 2.71828182845904 instead of the function EXP ?

    Regards,

    David

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,588

    Re: Is it possible to improve the functions UDF

    I'm not sure what that sentence means. multifly is the 5th parameter passed to each UDF and, in each case, it has a fixed value of 100.

    Not sure what you mean about putting it in a cell.

    No idea if it will improve performance. If it's a fixed value of 100, I don't see why it needs to be double but, if all the parameters are doubles it's probably better to be consistent so that there are no conversions.

    Regards, TMS

  5. #5
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,588

    Re: Is it possible to improve the functions UDF

    You're welcome. Thanks for the rep.



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. Improve userform using vba
    By stewfeed in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-08-2013, 05:06 PM
  2. Need your help to improve
    By baba4005 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 04-19-2012, 03:32 PM
  3. [SOLVED] Anyone help to improve my code?
    By Andrew in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-05-2006, 10:15 AM
  4. Suggestions to improve UDF
    By MrShorty in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-06-2006, 12:22 PM
  5. Help to improve macro
    By unni5959 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-19-2005, 07:05 PM

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