+ Reply to Thread
Results 1 to 12 of 12

translating-'if today's price is>than previous high price replace with todays' to function

  1. #1
    Registered User
    Join Date
    08-06-2018
    Location
    London, UK
    MS-Off Ver
    2013
    Posts
    5

    translating-'if today's price is>than previous high price replace with todays' to function

    Hi everyone,

    Apologies I'm new to this forum and an excel rookie.

    I'm trying to find the highest price of a continually updated input.
    The function in words is: if today's price is greater than yesterday's price, replace with today's.
    The issue I'm having is twofold:
    1) While, the input is constantly changing, I need to manually input a starting high price, which can be used as a 'base' to be compared to the continually changing input until the changing input moves beyond this 'base'.
    2) While using a simple IF function I can replace this manually inputed 'base' high price when the constantly changing input is greater than the 'base' price; but then I don't know how to lock that new high in before it changes. I need the new high to be locked into a cell until it is usurped by a higher price.

    I hope that is sort of clear.

    Thank you so much.

    Have a great day everyone.

    Kind Regards,

    Tom

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,998

    Re: translating-'if today's price is>than previous high price replace with todays' to func

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    08-06-2018
    Location
    London, UK
    MS-Off Ver
    2013
    Posts
    5

    Re: translating-'if today's price is>than previous high price replace with todays' to func

    Hi Glenn,

    Thank you for replying so fast.
    Please find attached, my best go at the above problem with you're instructions implemented.

    Thank you

    Kind Regards,

    Tom
    Attached Files Attached Files

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: translating-'if today's price is>than previous high price replace with todays' to func

    I don't believe the values in the yellow cells are the results you want. Please replace the formulae with the results you want to see. Do this manually.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,998

    Re: translating-'if today's price is>than previous high price replace with todays' to func

    So... do you want Excel to "remember" the highest value on each row, even if the highest value has subsequently been overwritten by a lower value?

    If so, you will need VBA.

  6. #6
    Registered User
    Join Date
    08-06-2018
    Location
    London, UK
    MS-Off Ver
    2013
    Posts
    5

    Re: translating-'if today's price is>than previous high price replace with todays' to func

    Hi Ali,

    Thanks for getting back to me.
    The results I want to see totally depend on what the 'constantly changing Price' is. It could be a a year before the 'constantly changing Price' goes above the base high, or it could be a couple of hours before a 'constantly changing price' replaces another 'constantly changing Price' in the highest price of input. I just need whatever the highest price at a given second to remain in a cell until a higher price comes along.

    Thank you

    Best Wishes

    David

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: translating-'if today's price is>than previous high price replace with todays' to func

    You need to illustrate what you mean (for me, at least). Perhaps give two versions of the table, a before and after, showing what you expect to change and what should remain the same.

    I suspect as Glenn has suggested, you will need VBA, but until I can visualise what you are describing, I can't be sure.

    Gordon/David/Tom - multiple personality disorder???

  8. #8
    Registered User
    Join Date
    08-06-2018
    Location
    London, UK
    MS-Off Ver
    2013
    Posts
    5

    Re: translating-'if today's price is>than previous high price replace with todays' to func

    Yes, until another higher value comes along.
    What's VBA?

    Thank you

  9. #9
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: translating-'if today's price is>than previous high price replace with todays' to func

    VBA = Visual Basic for Applications = code.

  10. #10
    Registered User
    Join Date
    08-06-2018
    Location
    London, UK
    MS-Off Ver
    2013
    Posts
    5

    Re: translating-'if today's price is>than previous high price replace with todays' to func

    Hi,

    apologies didn't realise VBA meant a Macro. I've been meaning to try and teach myself Macro's for a while so I guess this is a good reason to do so.
    I'll have a really good crack at it myself and if you don't mind come back if I get stuck.

    Thank you for the help.

    Best Wishes,

    Tom

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,647

    Re: translating-'if today's price is>than previous high price replace with todays' to func

    No problem - so come back to this thread if you get stuck. In the meantime, I'll move it to the VBA section.

    Macros use VBA, but not all VBA code is a macro.

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,998

    Re: translating-'if today's price is>than previous high price replace with todays' to func

    Withdrawn by GK
    Last edited by Glenn Kennedy; 08-06-2018 at 05:41 AM.

+ 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. Replies: 19
    Last Post: 10-20-2014, 03:57 PM
  2. [SOLVED] Track High Price of Stock from Date of Purchase
    By ecoperson in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-07-2013, 02:53 PM
  3. Replies: 3
    Last Post: 01-03-2013, 12:32 AM
  4. [SOLVED] Define current price as a % based on a high / Low price
    By helpbitte in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 11-21-2012, 12:45 PM
  5. Replies: 4
    Last Post: 08-15-2012, 09:49 AM
  6. How do I formulate a high price column
    By Lou New At Excel in forum Excel General
    Replies: 1
    Last Post: 04-17-2006, 08:35 PM
  7. [SOLVED] Recording a high price on a worksheet
    By Lou New At Excel in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-16-2006, 11:35 AM

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