View Single Post
Old October 31st, 2015, 10:06 AM
Zakalwe Zakalwe is offline
Authorized User
Points: 192, Level: 3
Points: 192, Level: 3 Points: 192, Level: 3 Points: 192, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Oct 2015
Location: South Africa
Posts: 48
Thanks: 0
Thanked 5 Times in 5 Posts
Talking Multiple Targets in one Worksheet


1. You are using the same code in both PivotTable3 & PivotTable4, after this: If Target.Address = Range("xxx").Address Then
Why not wrap this code in the function/Sub then call the same function twice, supplying the pivot table as a parameter for each call?

2. This is the same thing:
If Target.Address = Range("B18").Address Then
If Target.Address = Range("B51").Address Then
Select case Target.Address
Case "B18"
'Relevant Code
Case "B51"
'Relevant Code

Or ifThenElse.
If Target.Address = "B18" Then
'Relevant Code
ElseIf Target.Address = "B51"
'Relevant Code
'Relevant Code

On Worksheet Change the check the cell/Target that changed/triggered the Change event and execute relevant/unique steps applicable for that Target/TargetValue.
Nostalgia 4 Infinity