This final version may need a bit of tweaking if you, me, or both of us have muddled up the logic, but I think you can see the general idea
Code:Private Sub Worksheet_Change(ByVal Target As Range) If Application.Intersect(Target, Me.Range("C5:C24")) Is Nothing Then Exit Sub If Target.Row = 5 Then ' Target.Column = 3 And Target.Row = 5 Then If Target.Value = "Yes" Then Let Worksheets("FAR").Rows("14").Hidden = False Let Worksheets("Additions").Rows("6").Hidden = False ElseIf Target.Value = "No" Then Let Worksheets("FAR").Rows("14").Hidden = True Let Worksheets("Additions").Rows("6").Hidden = True End If End If ' hide row 14 in Tab FAR and Row 7 in Tab Additions if the value in row 6 Tab Additions is "NO" and leave unhidden if yes ' hide row 15 in Tab FAR and Row 8 in Tab Additions if the value in row 7 Tab Additions is "NO" and leave unhidden if yes ' hide row 16 in Tab FAR and Row 9 in Tab Additions if the value in row 8 Tab Additions is "NO" and leave unhidden if yes ' ......and so fort 20 times If Target.Row > 5 And Target.Row < 25 Then ' for rows 6,7,8.....24 If Target.Value = "No" Then Let Worksheets("FAR").Rows("" & Target.Row + 8 & "").Hidden = True Let Worksheets("Additions").Rows("" & Target.Row + 1 & "").Hidden = True ElseIf Target.Value = "Yes" Then ' leave unhidden if yes Let Worksheets("FAR").Rows("" & Target.Row + 8 & "").Hidden = False Let Worksheets("Additions").Rows("" & Target.Row + 1 & "").Hidden = False End If End If End Sub
This next version is not too efficient / slower, but might help to see what is going on:
Code:Private Sub Worksheet_Change(ByVal Target As Range) If Application.Intersect(Target, Me.Range("C5:C24")) Is Nothing Then Exit Sub If Target.Row = 5 Then ' Target.Column = 3 And Target.Row = 5 Then If Target.Value = "Yes" Then Worksheets("FAR").Activate Let Worksheets("FAR").Rows("14").Hidden = False Worksheets("Additions").Activate Let Worksheets("Additions").Rows("6").Hidden = False ElseIf Target.Value = "No" Then Worksheets("FAR").Activate Let Worksheets("FAR").Rows("14").Hidden = True Worksheets("Additions").Activate Let Worksheets("Additions").Rows("6").Hidden = True End If End If ' hide row 14 in Tab FAR and Row 7 in Tab Additions if the value in row 6 Tab Additions is "NO" and leave unhidden if yes ' hide row 15 in Tab FAR and Row 8 in Tab Additions if the value in row 7 Tab Additions is "NO" and leave unhidden if yes ' hide row 16 in Tab FAR and Row 9 in Tab Additions if the value in row 8 Tab Additions is "NO" and leave unhidden if yes ' ......and so fort 20 times If Target.Row > 5 And Target.Row < 25 Then ' for rows 6,7,8.....24 If Target.Value = "No" Then Worksheets("FAR").Activate Let Worksheets("FAR").Rows("" & Target.Row + 8 & "").Hidden = True Worksheets("Additions").Activate Let Worksheets("Additions").Rows("" & Target.Row + 1 & "").Hidden = True ElseIf Target.Value = "Yes" Then ' leave unhidden if yes Worksheets("FAR").Activate Let Worksheets("FAR").Rows("" & Target.Row + 8 & "").Hidden = False Worksheets("Additions").Activate Let Worksheets("Additions").Rows("" & Target.Row + 1 & "").Hidden = False End If End If End Sub
Alan
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
https://www.youtube.com/watch?v=SIDLFRkUEIo&lc=UgzTF5vvB67Zbfs9qvx4AaABAg
https://www.youtube.com/watch?v=v_1iqtOnUMg&lc=UgxLtKj969oiIu7zNb94AaABAg
https://www.youtube.com/watch?v=f7xZivqLZxc&lc=Ugxq4JHRza_zx3sz0fx4AaABAg
https://www.youtube.com/watch?v=f7xZivqLZxc&lc=Ugxq4JHRza_zx3sz0fx4AaABAg
https://www.youtube.com/watch?v=f7xZivqLZxc&lc=UgzMCQUIQgrbec400jl4AaABAg
https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz0Uy2bCSCTb1W-0_14AaABAg
https://www.youtube.com/watch?v=ITI1HaFeq_g&lc=Ugx12mI-a39T41NaZ8F4AaABAg.9iDQqIP56NV9iFD0AkeeJG
https://www.youtube.com/watch?v=vXyMScSbhk4&lc=Ugxa2VYHMWJWXA6QI294AaABAg.9irLgSdeU3r9itU7zdnW Hw
https://www.youtube.com/watch?v=tPRv-ATUBe4&lc=UgzFkoI0n_BxwnwVMcZ4AaABAg
https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugz0Uy2bCSCTb1W-0_14AaABAg.9htChVuaX9W9htG01cKBzX
https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugw6UrV69zpeKvLOeOV4AaABAg.9ht16tzryC49htJ6TpIO XR
https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=UgwMKwGZpDjv7vi7pCx4AaABAg
https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=Ugw6UrV69zpeKvLOeOV4AaABAg.9ht16tzryC49htOKs4jh 3M
https://www.youtube.com/watch?v=LuAipOW8BNQ&lc=UgxVW-am20rQ5GFuJ9F4AaABAg
https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA




Reply With Quote
Bookmarks