Hello there, I am having a mental block and wondered if someone could please assist?
Existing code
I want to hide C17:G18 if a value hasn't been entered into the three cells C16:E16 respectively. Can this be added to the above?
Thank you for your help.
Existing code
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
'Check choices made and show/hide rows/columns accordingly
Sheets("Instalments").Unprotect
Select Case Target.Address(0, 0)
Case "G16" 'Tick box
ActiveSheet.Shapes("CheckBox6").Visible = (Len(Target.Value) > 0)
Case "C10" 'Temporary debit calculator
If Target.Value = "No Payments" Then
Range("F:F").EntireColumn.Hidden = True
ElseIf Target.Value = "Credit on Account" Then
Range("F:F").EntireColumn.Hidden = False
ElseIf Target.Value = "Debit on Account" Then
Range("F:F").EntireColumn.Hidden = False
End If
Case "C20" 'Discount calculator
If Target.Value = "No Discount" Then
Range("21:34").EntireRow.Hidden = True
Range("C20").Select
ElseIf Target.Value = "25% Discount" Then
Range("21:24").EntireRow.Hidden = False
Range("25:34").EntireRow.Hidden = True
ElseIf Target.Value = "50% Discount" Then
Range("26:29").EntireRow.Hidden = False
Range("21:25").EntireRow.Hidden = True
Range("30:34").EntireRow.Hidden = True
ElseIf Target.Value = "50% Discount & 25% Discount" Then
Range("31:34").EntireRow.Hidden = False
Range("21:30").EntireRow.Hidden = True
End If
Sheets("Instalments").Protect
Range("C20").Select
End Select
End Sub
I want to hide C17:G18 if a value hasn't been entered into the three cells C16:E16 respectively. Can this be added to the above?
Thank you for your help.