I'm stumped as to why this isn't working. I had a jumble of nested IF/THEN/ELSE statements that worked, but was trying to clean up the code. The routine doesn't ever seem to run and I am not sure how/if I can use breakpoints in a Worksheet_Change routine. Any thoughts?
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count <> 1 Then Exit Sub
If Target.Row = 8 And Target.Column = 1 Then
Select Case Target.Offset(0, 1).Value
Case Is = "Abbott"
GoTo Abbott
Case Is = "Benton"
GoTo Benton
Case Is = "Clifton"
GoTo Clifton
Case Is = "Duncan"
GoTo Duncan
Case Is = "Everett"
GoTo Everett
Case Is = "Fletcher"
GoTo Fletcher
Case Is = "Wexford"
GoTo Wexford
Case Is = "Yardley"
GoTo Yardley
Case Is = "Thorndyke"
GoTo Thorndyke
Case Is = "Thurston"
GoTo Thurston
End Select
End If
If Target.Row = 67 And Target.Column = 2 Then
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Select Case Target.Value
Case Is = "Ceramic Tile"
GoTo CeramicFloorPowderRoom
Case Is = "Hardwood"
GoTo HardwoodFloorPowderRoom
Case Is = ""
GoTo UnselectedFloorPowderRoom
End Select
End If
If Target.Row = 16 And Target.Column = 2 Then
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Range("B13").Value = Null
Range("C13").Value = Null
Select Case Target.Value
Case Is = "Avondale"
GoTo AvondaleKitchenCabinets
Case Is = "MidContinent"
GoTo MidContinentKitchenCabinets
Case Is = ""
GoTo UnselectedUpgradeKitchenCabinets
End Select
End If
If Target.Row = 13 And Target.Column = 2 Then
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Range("B16").Value = Null
Range("C16").Value = Null
Exit Sub
End If
GoTo GetOut
Abbott:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = True
Range("Guest_Bedroom").EntireRow.Hidden = False
Range("Guest_Bathroom").EntireRow.Hidden = False
Range("Den").EntireRow.Hidden = False
Range("Staircase").EntireRow.Hidden = True
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Benton:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = False
Range("Guest_Bedroom").EntireRow.Hidden = True
Range("Guest_Bathroom").EntireRow.Hidden = True
Range("Den").EntireRow.Hidden = True
Range("Staircase").EntireRow.Hidden = True
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Clifton:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = True
Range("Guest_Bedroom").EntireRow.Hidden = False
Range("Guest_Bathroom").EntireRow.Hidden = False
Range("Den").EntireRow.Hidden = True
Range("Staircase").EntireRow.Hidden = True
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Duncan:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = False
Range("Guest_Bedroom").EntireRow.Hidden = True
Range("Guest_Bathroom").EntireRow.Hidden = True
Range("Den").EntireRow.Hidden = True
Range("Staircase").EntireRow.Hidden = True
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Everett:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = True
Range("Guest_Bedroom").EntireRow.Hidden = False
Range("Guest_Bathroom").EntireRow.Hidden = False
Range("Den").EntireRow.Hidden = False
Range("Staircase").EntireRow.Hidden = True
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Fletcher:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = True
Range("Guest_Bedroom").EntireRow.Hidden = False
Range("Guest_Bathroom").EntireRow.Hidden = False
Range("Den").EntireRow.Hidden = False
Range("Staircase").EntireRow.Hidden = True
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Wexford:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = True
Range("Guest_Bedroom").EntireRow.Hidden = False
Range("Guest_Bathroom").EntireRow.Hidden = False
Range("Den").EntireRow.Hidden = False
Range("Staircase").EntireRow.Hidden = True
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Yardley:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = False
Range("Guest_Bedroom").EntireRow.Hidden = True
Range("Guest_Bathroom").EntireRow.Hidden = True
Range("Den").EntireRow.Hidden = True
Range("Staircase").EntireRow.Hidden = True
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Thorndyke:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = False
Range("Guest_Bedroom").EntireRow.Hidden = False
Range("Guest_Bathroom").EntireRow.Hidden = False
Range("Den").EntireRow.Hidden = False
Range("Staircase").EntireRow.Hidden = False
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Thurston:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = False
Range("Guest_Bedroom").EntireRow.Hidden = False
Range("Guest_Bathroom").EntireRow.Hidden = False
Range("Den").EntireRow.Hidden = False
Range("Staircase").EntireRow.Hidden = False
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
CeramicFloorPowderRoom:
Range("C67").Select
Selection.Value = Null
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$J$16:$J$23"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = False
.ShowError = False
End With
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
HardwoodFloorPowderRoom:
Range("C67").Select
With Selection.Validation
.Delete
.Add Type:=None
.IgnoreBlank = True
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = False
.ShowError = False
End With
Selection.Value = "=IF(C$22=" & Chr(34) & Chr(34) _
& "," & Chr(34) & "Please select in Kitchen" _
& Chr(34) & ", IF(C$22=" & Chr(34) & Chr(34) _
& ", " & Chr(34) & Chr(34) & ", C$22))"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
UnselectedFloorPowderRoom:
Range("C67").Select
With Selection.Validation
.Delete
.Add Type:=None
.IgnoreBlank = True
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = False
.ShowError = False
End With
Selection.Value = ""
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
AvondaleKitchenCabinets:
Range("C16").Select
Selection.Value = Null
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$I$8:$I$11"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = False
.ShowError = False
End With
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
MidContinentKitchenCabinets:
Range("C16").Select
With Selection.Validation
.Delete
.Add Type:=None
.IgnoreBlank = True
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = False
.ShowError = False
End With
Selection.Value = "Frost"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
UnselectedUpgradeKitchenCabinets:
Range("C16").Select
With Selection.Validation
.Delete
.Add Type:=None
.IgnoreBlank = True
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = False
.ShowError = False
End With
Selection.Value = ""
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
GetOut:
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count <> 1 Then Exit Sub
If Target.Row = 8 And Target.Column = 1 Then
Select Case Target.Offset(0, 1).Value
Case Is = "Abbott"
GoTo Abbott
Case Is = "Benton"
GoTo Benton
Case Is = "Clifton"
GoTo Clifton
Case Is = "Duncan"
GoTo Duncan
Case Is = "Everett"
GoTo Everett
Case Is = "Fletcher"
GoTo Fletcher
Case Is = "Wexford"
GoTo Wexford
Case Is = "Yardley"
GoTo Yardley
Case Is = "Thorndyke"
GoTo Thorndyke
Case Is = "Thurston"
GoTo Thurston
End Select
End If
If Target.Row = 67 And Target.Column = 2 Then
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Select Case Target.Value
Case Is = "Ceramic Tile"
GoTo CeramicFloorPowderRoom
Case Is = "Hardwood"
GoTo HardwoodFloorPowderRoom
Case Is = ""
GoTo UnselectedFloorPowderRoom
End Select
End If
If Target.Row = 16 And Target.Column = 2 Then
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Range("B13").Value = Null
Range("C13").Value = Null
Select Case Target.Value
Case Is = "Avondale"
GoTo AvondaleKitchenCabinets
Case Is = "MidContinent"
GoTo MidContinentKitchenCabinets
Case Is = ""
GoTo UnselectedUpgradeKitchenCabinets
End Select
End If
If Target.Row = 13 And Target.Column = 2 Then
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Range("B16").Value = Null
Range("C16").Value = Null
Exit Sub
End If
GoTo GetOut
Abbott:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = True
Range("Guest_Bedroom").EntireRow.Hidden = False
Range("Guest_Bathroom").EntireRow.Hidden = False
Range("Den").EntireRow.Hidden = False
Range("Staircase").EntireRow.Hidden = True
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Benton:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = False
Range("Guest_Bedroom").EntireRow.Hidden = True
Range("Guest_Bathroom").EntireRow.Hidden = True
Range("Den").EntireRow.Hidden = True
Range("Staircase").EntireRow.Hidden = True
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Clifton:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = True
Range("Guest_Bedroom").EntireRow.Hidden = False
Range("Guest_Bathroom").EntireRow.Hidden = False
Range("Den").EntireRow.Hidden = True
Range("Staircase").EntireRow.Hidden = True
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Duncan:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = False
Range("Guest_Bedroom").EntireRow.Hidden = True
Range("Guest_Bathroom").EntireRow.Hidden = True
Range("Den").EntireRow.Hidden = True
Range("Staircase").EntireRow.Hidden = True
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Everett:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = True
Range("Guest_Bedroom").EntireRow.Hidden = False
Range("Guest_Bathroom").EntireRow.Hidden = False
Range("Den").EntireRow.Hidden = False
Range("Staircase").EntireRow.Hidden = True
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Fletcher:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = True
Range("Guest_Bedroom").EntireRow.Hidden = False
Range("Guest_Bathroom").EntireRow.Hidden = False
Range("Den").EntireRow.Hidden = False
Range("Staircase").EntireRow.Hidden = True
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Wexford:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = True
Range("Guest_Bedroom").EntireRow.Hidden = False
Range("Guest_Bathroom").EntireRow.Hidden = False
Range("Den").EntireRow.Hidden = False
Range("Staircase").EntireRow.Hidden = True
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Yardley:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = False
Range("Guest_Bedroom").EntireRow.Hidden = True
Range("Guest_Bathroom").EntireRow.Hidden = True
Range("Den").EntireRow.Hidden = True
Range("Staircase").EntireRow.Hidden = True
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Thorndyke:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = False
Range("Guest_Bedroom").EntireRow.Hidden = False
Range("Guest_Bathroom").EntireRow.Hidden = False
Range("Den").EntireRow.Hidden = False
Range("Staircase").EntireRow.Hidden = False
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
Thurston:
Application.EnableEvents = False
Application.ScreenUpdating = False
' Turn off screen updating. Makes things faster and more mysterious.
Sheets("Buyer Options").Unprotect Password:="phbocl"
Range("Powder_Room").EntireRow.Hidden = False
Range("Guest_Bedroom").EntireRow.Hidden = False
Range("Guest_Bathroom").EntireRow.Hidden = False
Range("Den").EntireRow.Hidden = False
Range("Staircase").EntireRow.Hidden = False
' Sheets("Buyer Options").Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="phbocl"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
CeramicFloorPowderRoom:
Range("C67").Select
Selection.Value = Null
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$J$16:$J$23"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = False
.ShowError = False
End With
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
HardwoodFloorPowderRoom:
Range("C67").Select
With Selection.Validation
.Delete
.Add Type:=None
.IgnoreBlank = True
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = False
.ShowError = False
End With
Selection.Value = "=IF(C$22=" & Chr(34) & Chr(34) _
& "," & Chr(34) & "Please select in Kitchen" _
& Chr(34) & ", IF(C$22=" & Chr(34) & Chr(34) _
& ", " & Chr(34) & Chr(34) & ", C$22))"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
UnselectedFloorPowderRoom:
Range("C67").Select
With Selection.Validation
.Delete
.Add Type:=None
.IgnoreBlank = True
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = False
.ShowError = False
End With
Selection.Value = ""
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
AvondaleKitchenCabinets:
Range("C16").Select
Selection.Value = Null
With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$I$8:$I$11"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = False
.ShowError = False
End With
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
MidContinentKitchenCabinets:
Range("C16").Select
With Selection.Validation
.Delete
.Add Type:=None
.IgnoreBlank = True
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = False
.ShowError = False
End With
Selection.Value = "Frost"
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
UnselectedUpgradeKitchenCabinets:
Range("C16").Select
With Selection.Validation
.Delete
.Add Type:=None
.IgnoreBlank = True
.InCellDropdown = False
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = False
.ShowError = False
End With
Selection.Value = ""
Application.EnableEvents = True
Application.ScreenUpdating = True
Exit Sub
GetOut:
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub