Hide row if certain cells on the row doesn't contain certain value

user_name

New Member
Joined
Feb 17, 2012
Messages
7
I've looked around these forums and done some searching on Google but didn't find exactly what i was looking for so i hope you guys can help me out!

Ok, So i have an excel sheet in which i need to do the following:

I have a dropdown menu with some 300 values in cell A1 from which users can select a value. (e.g. "Test" "Test2" "Test3" etc.)

There are 5040 rows in the sheet and the value chosen from the dropdown menu can occur in 6 cells per row. (Columns K to P)

I need a macro that will check these 6 cells per Row for the value chosen from the dropdown menu in A1.

If any of these 6 cells per row doesn't contain the value selected from the dropdown menu in A1 i want to hide the row that doesn't contain that value.

Then i would also like to have a "reset" button in A2 which you can press to unhide the rows again.

I really hope you guys can help me out.

Thanks,
Bas
 
Sorry for the late reply but thank you very much!
I already tried playing with the COUNTIF values but forgot to change the Offset.
Works like a charm now!
Thanks so much for your help.

All the best,
Bas
 
Upvote 0

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,221,310
Messages
6,159,173
Members
451,543
Latest member
cesymcox

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