Hiding a row based on a drop down menu value

Hypnoticmonki

New Member
Joined
Mar 6, 2018
Messages
2
Hello, I am new to the thread and relatively new to Excel. I have a job log spreadsheet and I have created a drop down menu to indicate whether the job is open or closed. As we have a fair amount of jobs, once the closed option has been selected I want to hide that row. I have researched it and looked on here, however there are some complicated (well to me anyways) codes that do more than I need.

All suggestions are welcome :confused::confused:

Thank you in advance

Jayne
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Hi & welcome to the board.
How about
Code:
Private Sub Worksheet_Change(ByVal Target As Range)

   If Target.CountLarge > 1 Then Exit Sub
   If Target.Column <> [COLOR=#ff0000]8[/COLOR] Then Exit Sub
   If Target.Value = "Closed" Then Target.EntireRow.Hidden = True

End Sub
Change the value in red to match the column number where you have your dropdown. (at the moment it's looking at Col H)
To use this, right click the sheet tab, select view code, & past the above code into the window that opens up.
Your workbook will need to be saved as an .xlsm file.
 
Upvote 0
Thank you so much for responding. I did everything you said but it didn't work. I copied the code into the box and changed it to reflect column E (entered 5) but nothing!

I know i am missing something simple, i just don't know what it is :(
 
Upvote 0
Do you have macros enabled?
Whenever you change the Dv in col E to Closed that row should get hidden
 
Upvote 0
Are you saving the code to the Sheet module that you want to apply it to?
Did you make any other changes to the code?
How exactly is "Closed" written on your sheets? Case matters.
If it is "closed", you will need to change the code to check for "closed" instead of "Closed".
 
Upvote 0

Forum statistics

Threads
1,223,164
Messages
6,170,444
Members
452,326
Latest member
johnshaji

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