VB Code to highlight modified cells
So In an Excel sheet, you want to highlight if any cell is modified i.e. value changed or deleted then you can do this through the below VB Code.
How to do this?
Open a Workbook
Right click at the bottom of the sheet where sheet name is i.e. Sheet 1 and then Click on View Code.
Paste the below code in the window and save it.
Private Sub WorkSheet_Change(ByVal Target as Range)
Target.Interior.ColorIndex = 6
End Sub
Target.Interior.ColorIndex = 6
End Sub
Now test it by changing a value in any cell of that sheet and that particular cell will get highlighted.
Limitations: You can’t know if a cell was modified multiple times and color highlight can also be removed.
No comments:
Post a Comment