PDA

View Full Version : execute macro if change to range



mshbhwn98
03-01-2013, 12:12 PM
I am trying to write a piece of code that says if a change is made to cells C8, C9 or C10 then execute a macro I have written.

I know how to do this for just one cell but not for a range of cells.

Any help would be appreciated.

Thanks

p45cal
03-01-2013, 01:44 PM
Private Sub Worksheet_Change(ByVal Target As Range)
Set xx = Intersect(Target, Range("C8:C10"))
If Not xx Is Nothing Then
For Each cll In xx.Cells
MsgBox "doing somethibg wth cell " & cll.Address
Next cll
End If
End Sub

mshbhwn98
03-01-2013, 06:24 PM
thanks