Enlight a modified cell

M

Musashi San

Hi,

I would like to know how to change automatically the color or font of a cell
when the user change the number or text in that cell. It's to see more
clearly in a big table which cell is modified (for exemple each time you
open the file or every week....).

Pls ; help us :) !!!
Thx a lot !
 
J

J.E. McGimpsey

one way:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count > 1 Then Exit Sub
.Interior.ColorIndex = 7
End With
End Sub


Put this in the worsheet code module (right-click on the sheet tab).
 
E

Earl Kiosterud

I'm not sure, but this may be what you want.

Dim CellAddress As Variant
Dim CellData

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = CellAddress Then
If Target.Value <> CellData Then
Target.Interior.ColorIndex = 36
End If
End If
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
CellAddress = Target.Address
CellData = Target.Value
End Sub

It's barebones, but you can see if it's what you're after.

Earl Kiosterud
mvpearl omitthisword at verizon period net
 

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