+ Reply to Thread
Results 1 to 2 of 2

turn calculation of max runup to UDF in VB

  1. #1
    Registered User
    Join Date
    04-10-2004
    Posts
    23

    turn calculation of max runup to UDF in VB

    max run up returns the largest consecutive gain from previous loss, I have came up with my own calculations using excel formular, but I want to turn all these into an user defined function coding in VB (but I don't know how to code in VB).

    in the spreadsheet attached:

    Col A & B are manual inputs
    Col C calculates the cumulative NAV/price
    Col D returns the NAV whenever there's a negative month occurs
    Col E returns the Max NAV ( if that month's NAV is the largest within the period )
    Col F calculates the rate of return - by using the (latest Max NAV - previous negative month's nav)/previous negative month's nav

    I want something like..
    "=maxrunup(B3:B92)" which will return the max runup as in cell H5
    "=runupstart(B3:B92)" which will return the start date when it starts like in cell I5
    "=runupend(B3:B92)" which will return the end date when it finishes like in cell J5

    thanks
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    04-10-2004
    Posts
    23
    can anyone help please?

+ 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