If cell value changes in 2 cells

K

Kashyap

Hi, I have a set of tasks to be done when value in E5 changes.. but I need to
do another set of tasks when value in H5 changes as well.. How to go around
it?
 
B

Barb Reinhardt

In your Worksheet Change event put something like this

if Not Intersect(Target,Me.Range("E5")) is Nothing then
'Do the events for E5
end if

Repeat for H5

HTH,
Barb Reinhardt
 
J

Jacob Skaria

Selec the Worksheet Change event

Private Sub Worksheet_Change(ByVal Target As Range)

If Not Application.Intersect(Target, Range("$E$5")) Is Nothing Then
'events
End If

If Not Application.Intersect(Target, Range("$H$5")) Is Nothing Then
'events
End If

End Sub
 
P

Patrick Molloy

in the code for the worksheet's change event ...


Private Sub Worksheet_Change(ByVal Target As Range)

SELECT CASE Target.Address
CASE "$E$5"
' do something
CASE "$H$5"
'do something else
CASE ELSE
END SELECT

End Sub
 
Top