I have a macro which should be triggered when any cell in the range (s1:s100) changes. Range s1:s100 is populated by another macro and the values keep changing
I have the below piece of code, which works fine when only one cell in the range is changed. If more than one cell changes at the same time, it doesn't work. When more than one cell changes at a time, I get the message "No Change".
Sub Worksheet_Change(ByVal Target As Range)
Dim keyscells as Range
Set KeyCells = Range("S1:S100")
If Not Application.Intersect(KeyCells, Range(Target.Address)) _
Is Nothing Then
msgbox Target.Address
'execute my macro
else
msgbox 'no change'
end if
end sub
Any help appreciated!
Added more info When I edit more than one cell at the same time, say S1 S4 and S8, It will say S1 changed (Just pick the first one). But I need to identify all the three cells that was changed.
Thanks,
Valli