Hiding A row based on second work sheet based on Yes / No dropdown on first work sheet help....

TombSpoon

New Member
Joined
Mar 6, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi,

apologies, quite new to fomulas and VBA.

I'm trying to find a way to hide a row of information based upon a yes or no from a dropdown selection in a cell on a different work sheet. For example

On sheet "1 Example" I have selected a "Yes" input in cell "E5" I would like it completely hide row "6" on Sheet "test to name" which contains irrelevant information.

I am quite happy to remove the dropdown menu if simply typing a Yes or No answer makes it more simple.

Many thanks for any help.

S
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hi,
You can test following
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Address <> "$E$5" Then Exit Sub
    With Sheets("test to name").Rows("6:6").EntireRow
        If Target.Value = "Yes" Then
            .Hidden = True
        Else
            .Hidden = False
        End If
    End With
End Sub
 
Upvote 0
Solution
Hi,
You can test following
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Address <> "$E$5" Then Exit Sub
    With Sheets("test to name").Rows("6:6").EntireRow
        If Target.Value = "Yes" Then
            .Hidden = True
        Else
            .Hidden = False
        End If
    End With
End Sub

Thanks, thats great. I have just been told, I need to create it without VBA... Would something like this be possible using formulas alone? As in:

If a sheet named "1.Example" cell E5 contains the word "No", Hide all of row 6 on sheet "test to name"?

Sorry, many thanks for the help @James006 !

S
 
Upvote 0
Glad this is helping you out :)

Do not want to know who might have suggested to perform this task " without VBA " ... but, unfortunately, it is a joke :rolleyes:
 
Upvote 0
Glad this is helping you out :)

Do not want to know who might have suggested to perform this task " without VBA " ... but, unfortunately, it is a joke :rolleyes:

Many thanks, i'm as gullible as they come and it was my so called "leader" ... Cheers
 
Upvote 0

Forum statistics

Threads
1,215,655
Messages
6,126,050
Members
449,283
Latest member
GeisonGDC

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