Hide/show rows with certain column data based on single cell

cxncxn

New Member
Joined
Jan 22, 2015
Messages
4
Hi everyone,

I have multiple Excel sheets with the following lay out:

- Standard info till line 23
- Variable rows from line 24 to ... ? (different for each Excel) with 2 important columns, "Type" (= column B) and "Description". After these rows there are a few empty rows (possibility to define end row being empty?)
- The "Type" column has the following possibilities:
1) Basis
2) ARP
3) PSP
4) Extra

Cases:
When cell G21 = 1, I want to hide the lines which have the following data in column B "Type":
Hide "PSP" and "Extra"

When cell G21 = 2, I want to hide the lines which have the following data in column B "Type":
Hide "Extra"

When cell G21 = 3, I want to hide the lines which have the following data in column B "Type":
Hide nothing


Furthermore, I want this to be wrapped in a Worksheet_change and I've heard that screenupdating should be off until everything is done.

Can anyone help me in the right direction? Thank you very much!
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,216,975
Messages
6,133,829
Members
449,836
Latest member
MeltedVision

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