Change Color Of Cell Text When Cell Info Is Changed

ctsuhako

New Member
Joined
Aug 15, 2002
Messages
21
I would like to be able to use a macro or some simple VB to do the following:

If the entered data in a cell is changed, I would like the changed data to be shown as red. This should apply to the entire workbook.

Is there a simple way of achieving this?

Thank you.
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Well, yeah there is a simple way to do that. But, I'm sure all the other issues it brings up will be what you notice next.

To start with, here's what you've requested. (We'll deal with the rest as you bring them up.)
Go into your vb editor and double click on 'ThisWorkbook'. (Will put you inside the ThisWorkbook code module.)
Copy & paste this code in there:
Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Target.Font.ColorIndex = 3
End Sub
And then hit AltQ to close the vb editor.

Now what ever value gets changed, or - (as currently written), entered in the workbook will turn red.

Does that help?
 
Upvote 0
Hello, HalfAce:

This works well, except for the following refinement:

1. Can I exclude blank cells from being subject to the color change, or better yet exclude certain cell ranges?

What I have is a very long pricing list and would like to user to be able to quickly see what prices have changed.

Thank you.
 
Upvote 0
Oh yeah, absolutely.
Would you rather exclude certain range from this, or would you rather just specify the range(s) you want it to work in?

If you were to only want it to perform on the pricing list(s), what sheet(s)/range(s) would we be looking at?
 
Upvote 0
Hello, HalfAce:

It would make more sense to specify the range(s). It would only involve one sheet with multiple ranges. A basic example would be sufficient (I think). Thanks!
 
Upvote 0

Forum statistics

Threads
1,224,582
Messages
6,179,670
Members
452,936
Latest member
anamikabhargaw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top