+ Reply to Thread
Results 1 to 3 of 3

Difference between value and max of a range as long as different cell value increases

  1. #1
    Registered User
    Join Date
    12-12-2019
    Location
    Japan
    MS-Off Ver
    Pro Plus 2010
    Posts
    23

    Difference between value and max of a range as long as different cell value increases

    I've been trying to figure this out on my own and have made a bit of progress but I've hit a bit of a wall and am a little confused about what function I should be concentrating on, SUMIF, OFFSET, MATCH etc. So I'd greatly appreciate it if someone could point me in the right direction.

    What I'd like to achieve is to be able to see the difference in two prices until price reverses.

    Untitled-1.jpg

    When 1 (OPEN) is less than 3 (SMA20) and 2 (CLOSE) is more than 3
    The difference between 4 (OPEN) and 5 (HIGH) is shown, 5 being the highest number beginning from the above condition until 6 (CLOSE) is less than 7 (SMA20)

    What kind of functions should I narrow my search to in order to achieve this? 4 will always be directly under 1 but 5 won't always be in the same place, depending on whether prices reversed quickly or not. I know I can use =MAX but I'm struggling with the need for it to be a) conditional and b) different possible lengths of values.


    Any help at all greatly appreciated.

    Gareth

  2. #2
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: Difference between value and max of a range as long as different cell value increases

    It's not really clear what your expected output is - i.e. are you comparing the High & Low for the row in which the Max High is found, or comparing the Max High to each of the Lows (within range), and aggregating the results?

    As a starter, the below would isolate the Max High but without knowing the answer to the above, it's hard to provide the remainder....

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by XLent; 12-13-2019 at 04:36 AM.

  3. #3
    Registered User
    Join Date
    12-12-2019
    Location
    Japan
    MS-Off Ver
    Pro Plus 2010
    Posts
    23

    Re: Difference between value and max of a range as long as different cell value increases

    Thanks for your quick reply, sorry my original message wasn't clear. I'm aiming to compare a specific OPEN value (B1774 in the picture) to what Excel would determine to be the highest HIGH value, again in the picture C1776.

    But your solution gets me 99% of the way there, thank you so much! The only thing I need to amend to the formula is to then subtract the initial OPEN value from the HIGH so I can see the difference between the two, I think I can muddle through and work that out.

    Thanks so much again,

    Gareth

+ 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] Formula to calculate new cell value based on a range of possible increases
    By iscaspar in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-24-2019, 03:12 PM
  2. Clear Cell range upon Changing data in difference Range
    By snuffnchess in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-08-2016, 02:22 AM
  3. [SOLVED] Numerical values increases as name increases
    By Jbelle7435 in forum Excel General
    Replies: 3
    Last Post: 09-16-2014, 01:41 PM
  4. Replies: 7
    Last Post: 07-13-2012, 08:59 PM
  5. [SOLVED] Difference between grabbing a cell in a range vs. a value
    By BeefNoodleSoup in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-15-2012, 10:52 AM
  6. CountIf applied to range that increases by one element for each iteration
    By RowanB in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-11-2012, 04:31 AM
  7. [SOLVED] how long date difference
    By hellZg8 in forum Excel General
    Replies: 9
    Last Post: 06-25-2006, 02:10 AM

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