+ Reply to Thread
Results 1 to 3 of 3

VBA to Change the Font Color if the Cells Value has Changed

  1. #1
    Registered User
    Join Date
    11-20-2017
    Location
    Harrisburg, PA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    56

    VBA to Change the Font Color if the Cells Value has Changed

    I am trying to write a macro that will change the font color of a cell if the cells value has changed. I can get it to work for cells that are manually changed but I need it to work when the value changes in a cell that has a formula populating that cell with data from another sheet. Any help is greatly appreciated!

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: VBA to Change the Font Color if the Cells Value has Changed

    You will probably have to use Private Sub Worksheet_Calculate() and set calculation to automatic to get it to respond to values changed by formula since Excel ignores changes resulting from calculations in the Worksheet_Change event.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Registered User
    Join Date
    11-20-2017
    Location
    Harrisburg, PA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    56

    Re: VBA to Change the Font Color if the Cells Value has Changed

    JLGWhiz,

    I did try using Private Sub Worksheet_Calculate() but ovbiously did not do something correct and am looking for help to solve.

+ 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. change cell color only if that cells font color is black and it's value is < 2000
    By randall78 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 02-05-2019, 05:23 PM
  2. Event when font color changed
    By Axmed.cm in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-07-2017, 07:29 AM
  3. [SOLVED] command button color changed while cells value change and else...
    By iqballud in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-10-2013, 08:24 AM
  4. Replies: 2
    Last Post: 02-04-2013, 02:00 PM
  5. [SOLVED] Changed the color of font when criteria met
    By kachuen2006 in forum Excel General
    Replies: 4
    Last Post: 10-23-2012, 04:56 AM
  6. Cell value is changed, the cells change the color
    By lsuersoy in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-06-2010, 07:17 AM
  7. Replies: 1
    Last Post: 01-04-2005, 12:06 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