+ Reply to Thread
Results 1 to 12 of 12

How to show if a cells value was an increase or decrease using conditional formatting

  1. #1
    Registered User
    Join Date
    05-31-2018
    Location
    London
    MS-Off Ver
    365
    Posts
    20

    How to show if a cells value was an increase or decrease using conditional formatting

    Thankyou for any help you can offer on this. I have been working on it for 2 hours and cant think of how to resolve it. Any suggestions would be greatly appreciated.

    I have a cell (A1) in Excel that constantly changes. It calls price data from another website and updates every 10 seconds.

    I would like to create an arrow indicator in cell B1 that shows whether the current price in Cell A1 is greater or less than the last price is showed in A1.

    In effect, if cell A1 showed a price of $1 and then changed to $1.5 I would like Cell B1 to show a green arrow indicating that the price moved up. Conversely if A1 showed a price of $1 and then updated to show a price of $0.75 I would like B1 to show a red down arrow indicating that the price is going down. Thankyou

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,736

    Re: How to show if a cells value was an increase or decrease using conditional formatting

    You can't compare a value to a second value if the second value isn't there anymore. The only way I can think of to this is that when A1 is updated, save the previous value in another cell for comparison. This is probably going to require VBA. How are you doing the updates? Is it possible to provide a sample copy of your file?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: How to show if a cells value was an increase or decrease using conditional formatting

    Hi there,

    Take a look at the attached workbook and see if it does what you need. It uses the following code inserted in the VBA CodeModule of the worksheet whose values you want to monitor:

    Please Login or Register  to view this content.
    Note: The font of Cell B1 (Pointer Cell) is set as "Wingdings"

    The highlighted values may be altered to suit your requirements.


    Hope this helps - please let me know how you get on.

    Regards,

    Greg M
    Attached Files Attached Files

  4. #4
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: How to show if a cells value was an increase or decrease using conditional formatting

    Hi again,

    The following modification is VERY slightly better than the original version:

    Please Login or Register  to view this content.

    Regards,

    Greg M
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-31-2018
    Location
    London
    MS-Off Ver
    365
    Posts
    20

    Re: How to show if a cells value was an increase or decrease using conditional formatting

    Hi, thanks very much for suggestions and the workbook example, much appreciated. I'm a complete novice with this stuff so really sorry if this question sounds silly but when I open the workbook there are 3 cells. If I change cell A1 it doesn't change the arrow in B1. Should I be updating it another way to get the arrow to change? thanks again for helping

  6. #6
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: How to show if a cells value was an increase or decrease using conditional formatting

    Hi again,

    Many thanks for your feedback and also for the Reputation increase - much appreciated!

    When I open the workbook I posted, the value 111 is displayed in Cell A1. If I change this value to 222 the green up-arrow is displayed in Cell B1. If I change the value in Cell A1 back to 111 the red down-arrow is displayed in Cell B2.

    Hope this helps, but feel free to ask if you need any further information.

    Best regards,

    Greg M

  7. #7
    Registered User
    Join Date
    05-31-2018
    Location
    London
    MS-Off Ver
    365
    Posts
    20

    Re: How to show if a cells value was an increase or decrease using conditional formatting

    hi Greg thanks for the reply and help , yes i tried the same as you but it doesn't work for me. The arrow in B1 dosnt change. It says macros have been blocked. not sure if that is what is preventing it from working. should enable macros?

  8. #8
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Re: How to show if a cells value was an increase or decrease using conditional formatting

    Before opening the workbook, right-click it and look at the Properties - there should be an option to enable macros there.
    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.

  9. #9
    Registered User
    Join Date
    05-31-2018
    Location
    London
    MS-Off Ver
    365
    Posts
    20

    Re: How to show if a cells value was an increase or decrease using conditional formatting

    ah yes, perfect, all working.. that's great !! and Greg this is perfect for what I need, thankyou so much really appreciate your help..

  10. #10
    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. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,421

    Re: How to show if a cells value was an increase or decrease using conditional formatting

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

  11. #11
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,481

    Re: How to show if a cells value was an increase or decrease using conditional formatting

    Hi again,

    Great! Glad to have that feedback and to hear that everything's working correctly for you now.

    Regards,

    Greg M

  12. #12
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,234

    Re: How to show if a cells value was an increase or decrease using conditional formatting

    This is still a modification of Greg M's code, not requiring an auxiliary cell (C1)
    Please Login or Register  to view this content.
    Artik

+ 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: 4
    Last Post: 08-21-2023, 09:04 AM
  2. Is there a forumula to show increase/decrease in numbers with Icons
    By dchar1 in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 05-18-2023, 03:29 PM
  3. Replies: 3
    Last Post: 12-08-2015, 10:07 AM
  4. Replies: 1
    Last Post: 03-30-2015, 03:10 PM
  5. Conditional Formatting formula - Percentage increase/decrease price colour
    By appsam1990 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-21-2014, 06:14 AM
  6. Replies: 3
    Last Post: 09-18-2012, 01:01 AM
  7. Replies: 2
    Last Post: 05-14-2012, 02:56 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