If you find any post useful then, please do share with others. Thanks!

Popular Posts

Contact

Email me

Need help and that also free? I like to learn this way, in case of any question or for a small task, please feel free to email me with details and example data, if required.

Tuesday, October 8, 2013

VB Code to highlight modified cells

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


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