+ Reply to Thread
Results 1 to 4 of 4

How to keep a high water mark

  1. #1
    Registered User
    Join Date
    11-10-2006
    Posts
    2

    How to keep a high water mark

    I would like to keep track of the largest value a certain cell ever reaches.
    The monitored cell is a stock price.
    The high water mark (HWM) value should be kept in a different cell.

    Can anyone think of a way to do this using a formula?

    Thanks,
    Terry

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    If the numbers are input into the same row range every day..........

    Set up an intentional circular reference:
    Assume the range of numbers is A1:E1.
    New numbers are entered each day.
    Assume the formula cell is G1.

    Goto Tools>Options>Calculation
    Check Iteration ,OK

    Formula in G1:

    =MAX(A1:E1,G1)

    In order to avoid the circular reference warnings and popups you must first
    set iteration before you create the formula.

    A disadvantage to doing this is that there is no audit trail, and, if for example you enter 1000 but meant to enter 100, ooops!

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    11-10-2006
    Posts
    2

    Smile

    That works perfectly for me!!

    Thanks for the explanation about iteration.

    My Excel 2003 version does not have an OK, but it does have an iteration count. The default maximum count is 100. Is that an acceptable value?

    Regards,
    Terry

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Glad I could help. Not sure about the default maximum count is 100 bit as I don't have excel 2003.

    Is there anything on excel help ??

    VBA Noob

+ 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