Hi All,
Can anyone advise, I have not really done a lot of programming in excel. I have an excel sheet which is used a take off list for a mchine which as a number of variations.
My first problem which i managed to solve was turning off a particular set cells if the machine size was any size other than 1750.
My next problem is I want to create another one which will turn off cells if the value in a another cell says yes or no. Can anyone Advise.
Vba Script so far:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count = 1 And Target.Address = "$B$7" Then
If LCase(Target.Value) = "800" Then
Rows("87:93").EntireRow.Hidden = True
ElseIf LCase(Target.Value) = "1000" Then
Rows("87:93").EntireRow.Hidden = True
ElseIf LCase(Target.Value) = "1200" Then
Rows("87:93").EntireRow.Hidden = True
ElseIf LCase(Target.Value) = "1500" Then
Rows("87:93").EntireRow.Hidden = True
Else
Rows("87:93").EntireRow.Hidden = False
End If
End If
End Sub
Private Sub Worksheet_Change1(ByVal Target As Range)
If Target.Cells.Count = 1 And Target.Address = "$B$10" Then
If LCase(Target.Value) = "Yes" Then
Rows("56:65").EntireRow.Hidden = True
Else
Rows("56:65").EntireRow.Hidden = False
End If
End If
End Sub
Bookmarks