Blanchetdb
Board Regular
- Joined
- Jul 31, 2018
- Messages
- 161
- Office Version
- 2016
- Platform
- Windows
I found the following coding but I would like to know to adapt it to text
[TABLE="width: 384"]
<colgroup><col width="64" style="width: 48pt;" span="8"> <tbody>[TR]
[TD="width: 384, bgcolor: transparent, colspan: 6"]Private Sub Worksheet_Change(ByVal Target As Range)
[/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, colspan: 8"] If Target = "Indeterminate" Or "Term" Or "Transfer" Or "As Required" Then Exit Sub
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, colspan: 5"] If Target.Address(0, 0) <> "C36" Then Exit Sub[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, colspan: 6"] Sheets("Sheet1").Rows("95:103").Hidden = Target.Value = 0
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]End Sub[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
What I am looking for is where the person would select an option in Cell C36 ( example - Term) and if so, rows 95-103 would hide. There are a number of other options that would require the rows to hide as well
[TABLE="width: 384"]
<colgroup><col width="64" style="width: 48pt;" span="8"> <tbody>[TR]
[TD="width: 384, bgcolor: transparent, colspan: 6"]Private Sub Worksheet_Change(ByVal Target As Range)
[/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[TD="width: 64, bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, colspan: 8"] If Target = "Indeterminate" Or "Term" Or "Transfer" Or "As Required" Then Exit Sub
[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, colspan: 5"] If Target.Address(0, 0) <> "C36" Then Exit Sub[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent, colspan: 6"] Sheets("Sheet1").Rows("95:103").Hidden = Target.Value = 0
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]End Sub[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[/TR]
</tbody>[/TABLE]
What I am looking for is where the person would select an option in Cell C36 ( example - Term) and if so, rows 95-103 would hide. There are a number of other options that would require the rows to hide as well