kevinonexcel
New Member
- Joined
- Jul 15, 2010
- Messages
- 13
hello,
I am trying to run a private worksheet change macro based on a range. Right now it runs on a specific cell but I want to name that range and run it off the range so that the spread sheet can be easily maintained.
for example:
If Target.Column = 3 And Target.Row = 85 Then
Select Case Target.Value
Case "Not Required"
Sheets("A").Range("Parts").EntireRow.Hidden = True
Case "Customer Responsibility"
Sheets("A").Range("Parts2").EntireRow.Hidden = True
Case Else
Sheets("A").Range("Parts").EntireRow.Hidden = False
End Select
Sheets("Main").Select
Range("C86").Select
End If
How to I change the if statement so that it is based on a cell that is named instead of the cell's coordinates.
Thank you
I am trying to run a private worksheet change macro based on a range. Right now it runs on a specific cell but I want to name that range and run it off the range so that the spread sheet can be easily maintained.
for example:
If Target.Column = 3 And Target.Row = 85 Then
Select Case Target.Value
Case "Not Required"
Sheets("A").Range("Parts").EntireRow.Hidden = True
Case "Customer Responsibility"
Sheets("A").Range("Parts2").EntireRow.Hidden = True
Case Else
Sheets("A").Range("Parts").EntireRow.Hidden = False
End Select
Sheets("Main").Select
Range("C86").Select
End If
How to I change the if statement so that it is based on a cell that is named instead of the cell's coordinates.
Thank you