+ Reply to Thread
Results 1 to 2 of 2

Return Max Value from a dynamic cell

  1. #1
    Registered User
    Join Date
    04-02-2020
    Location
    US
    MS-Off Ver
    365
    Posts
    1

    Post Return Max Value from a dynamic cell

    Hi All!

    I have a workbook that calculates a quantity of shares to order based off a realtime stock quote that is ever changing. The workbook appears as below:


    $Amt available | Last Stock Price | Quantity to order |
    (Fixed)............| (Variable).........| =roundup($amt avail/last price)


    The quantity to order field changes every second the Last Stock Price column pulls in real time market data, and then that feeds into a separate worksheet that generates my order list. Right now, that sheet simply pulls the quantity in the respective Quantity to Order cell. I.e. Cell C2 in the 'Order List' worksheet is: ='Calculations'!C2

    What I would like is for that cell to instead return the highest calculated value, rather than the current value of CalculationsC2. In other words, if CalculationsC2 goes from 1000 to 1001 to 999, I want cell OrderListC2 to hold the value of 1001, preferably via formula rather than vba.

    Any ideas on how to do something like this, please let me know!!!!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Return Max Value from a dynamic cell

    First you would need to turn on ITERATIONS in your workbook for this worksheet. This would allow you to create a formula wherein the formula references itself. This normally would give a "circular reference" error.

    Then your circular formula would work and look like this:

    IF('Calculation'!C2>C2, 'Calculation'!C2, C2)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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. [SOLVED] Populate Dynamic Array from Cell Values and write to Dynamic Range
    By TFiske in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-22-2018, 09:09 AM
  2. [SOLVED] Cell to return static time and dynamic date
    By ChipsSlave in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-06-2017, 01:18 PM
  3. Find value in dynamic table and return cell in same row.
    By bryans2094 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-20-2013, 09:33 AM
  4. [SOLVED] Find specific cell and return column number from a dynamic range
    By nivoe in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-18-2012, 12:39 PM
  5. Replies: 0
    Last Post: 11-16-2012, 11:42 AM
  6. Formula To Return Values in a Dynamic Cell
    By donnydorko in forum Excel General
    Replies: 3
    Last Post: 10-21-2009, 12:45 PM
  7. return dynamic current active cell!!
    By Ginola in forum Excel General
    Replies: 3
    Last Post: 06-08-2005, 02:05 PM

Tags for this Thread

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