Change color fill when data in cell changes

C

Cali Sal

I'd like the cell color to change when I change the data in the cell (sort of
checking off that I've updated a cell), can I do this using conditional
formatting?
 
D

default105

patterns after you click the format button
--
Pete Blackburn - words to live by:
"Don''t ever let somebody tell you. You can''t do something.You got a
dream,You gotta protect it." Edited Quote from the Pursuit Of Happiness
 
C

Cali Sal

Thanks, but I know how to change the color of the cell manually. What I'd
like is: when I change the data in the cell, the color fill changes to yellow
(for example).

The purpose is: I have 100 rows of data, when I update the excel (which I do
monthly) I what the updated cells to change color. Is this possible?
 
S

Shane Devenshire

Hi,

And if the cell is already yellow what do you want to do? Where are the
cell you want this to happen to, what sheet, what range?

Hi,

Here is some sample code:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim isect As Range
Set isect = Application.Intersect(Target, Range("A1:A10"))
If Not isect Is Nothing Then
Target.Interior.ColorIndex = 6
End If
End Sub

1. To add this code to your file, press Alt+F11,
2. In the VBAProject window, top left side, find your sheet name under your
file name and double click it.
3. Paste in or type the code above.

The will work on the range A1:A10 in the activesheet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top