Detect change in value of a cell via VBA

Detect change in value of a cell via VBA

Postby kawstov » Thu Aug 14, 2014 1:11 am

Did the following:

1. Right Click on the Worksheet tab and selected 'view code'.

Entered this code:
Code: Select all
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("a2").Address Then

Range("A2:F2").Interior.Color = RGB(256, 0, 0)

End If
End Sub

2, Save the VBA window and close it.

This will do the purpose.
Get the Source File here
Detect Cell Change.xlsm
Remember to enable the macro before you run it
(18.82 KiB) Downloaded 171 times
Cheers!
Kawstov
kawstov
Site Admin
 
Posts: 119
Joined: Tue May 28, 2013 10:51 pm

Return to Excel

Who is online

Users browsing this forum: No registered users and 1 guest

cron