Changing text colors for editing

J

Jalynno

If I have a previously saved worksheet that was saved with black text/font
and I want to keep track of cells I have edited and ones I need to edit by
having the ones I edit change to red, how can this be done without formatting
the cells as I go along or clicking the text color shortcut button for each
cell.

Thanks.
 
G

Gord Dibben

Private Sub WorkSheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
On Error GoTo ws_exit:
Application.EnableEvents = False
With Target
.Interior.ColorIndex = 3
End With
ws_exit:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View Code"

Copy/paste into that sheet module.

Alt + q to return to the Excel window.

When you edit a cell or enter data in a previously blank cell, background of
cell will turn red.


Gord Dibben MS Excel MVP
 

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