Home > Forum Home > Planning and Managing Projects > Using more than one cell as reference using worksheet_change Share

Using more than one cell as reference using worksheet_change

Excel Help for Using More Than One Cell As Reference Using Worksheet_change in Planning and Managing Projects


Forum TopicPost Reply Login

Using More Than One Cell As Reference Using Worksheet_change

Rate this:
(3/5 from 1 vote)
ConfusedThe code below works well but how to make more than one cell branch to another sheet or run a macro?

i.e. If cell H34="buy something" then goto sheet xx

plus keep the code below.
VBA Code:


Private Sub Worksheet_Change(ByVal Target As Range)
'First make sure B6 was what changed
If Intersect(Target, Range("g27")) Is Nothing Then
Exit Sub
End If

If Range("g27") = "x" Then
Sheets("Company data").Select
Application.Goto Reference:="r11c6"
End If

If Range("g27") = "y" Then
Sheets("blah blah and blah").Select
Application.Goto Reference:="r11c6"
End If

If Intersect(Target, Range("g27")) Is Nothing Then
Exit Sub
End If


End Sub

In summary how to make more that one cell on 1 sheet work using the
Private Sub Worksheet_Change(ByVal Target As Range) method.
Is it possible or does one have to have something else?
 Posted by on
 
There are currently no replies to the "Using more than one cell as reference using worksheet_change" topic of the Excel Help Forum for Planning and Managing Projects.

Post Reply

Find relevant Excel templates and add-ins for Using more than one cell as reference using worksheet_change in the