Hide rows based on drop down list

ndox123

New Member
Joined
Aug 1, 2019
Messages
6
Hi MrExcel,

I'm fairly new to VBA and macros in Excel and could use more than some help with it!
Currently i'm working on creating a report where i have a drop down list of countries (in cell C2) with the list of countries (in column A) and their datas across row A7 to S65. I would love to know how to create a VBA rules whereby if I select the country from the drop down list in cell C2 it will then only show the rows that contains that specific country.

Really appreciate your help!
Thank you
ndox
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Hi and welcome to Mr. Excel!

This is a very common question, and the idea here, is to do a search for similar questions; if you can't find anything, then post.

I did a quick search for you, and came up with many solutions - based on all kinds of different criteria, but they should give you the starting point you need - if not the actual solution.
https://www.mrexcel.com/forum/excel...selection.html?highlight=hide+rows+based+drop
 
Upvote 0
Also to add - is it possible to keep Row 6 and row 37 visible despite what's being picked from the drop down list?
 
Upvote 0
You said:
if I select the country from the drop down list in cell C2 it will then only show the rows that contains that specific country.

So if only 5 rows show that particular country.

You want the other nearly 1.5 million rows Hidden.

I would think that may be difficult.
 
Upvote 0
Apologies, i meant just hide any rows between row 6 to 65 that don't contain the specific country selected. Is this possible?
 
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