Hiding Rows

Rob32

New Member
Joined
Sep 23, 2002
Messages
4
I have a list of 15 items (Say in column B1:B15)in column C1:C15 is a drop down box where the person can select either "Yes" or "No". if they select "yes" then the value of that item shows in the cell to its right (cells D1:D15). i have these cells linked to another tab where i have linked cells D1:D15 to say cells D30:D45 on the other Tab. Now what i want to know is if say cell C5 on the original tab = "No", can i somehow hide the whole Row to which that cell (say c5) relates to on the other tab, and then if i was to change the drop down box to "yes" again then that Whole row would then Unhide??

Thanks

ROB
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Hi ROB,
Try the following code (in "Sub Worksheet_Change")
'>>> Code Start
Private Sub Worksheet_Change(ByVal Target As Range)
If UCase(Target.Value) = "NO" Then
Worksheets("Sheet2").Rows(Target.Row + 29).Hidden = True
ElseIf UCase(Target.Value) = "YES" Then
Worksheets("Sheet2").Rows(Target.Row + 29).Hidden = False
End If
End Sub

'>>> Code End

thanks
- sam
 
Upvote 0

Forum statistics

Threads
1,203,544
Messages
6,056,029
Members
444,840
Latest member
RazzelDazel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top