Hide/Unhide Row based on dropdown value

blaqoutent23

New Member
Joined
Sep 28, 2019
Messages
2
Hi all,

I'm extremely new to VBA and need assistance.
I have 2 worksheets;
Worksheet 1 has is a list of all employees in both department "A" & "B".
Worksheet 2 is a list of employees from department "A" & their tasks for the day.

I would like to create a VBA where I can enter all of my employees from both department "A" & "B" in worksheet #1 and have a drop down list next to each name with "Yes" / "No" values to hide/unhide the row associated with that employee in worksheet #2 in case an employee is shifted from departments.

Hope this wasn't too confusing!
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
I'm assuming that you are manually selecting the Yes and No values.
So assuming the Yes/No values are in column C and that you want to hide rows where column C says "No" you want to check all the rows in the used portion of the sheet, you could have a sub that does the following:

Code:
For Each c In Range(Cells(1, 3), Cells(UsedRange.Rows.Count, 3))
    c.EntireRow.Hidden = (c.Value = "No")
Next
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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