Hiding rows based on value in cell

Mable

New Member
Joined
Feb 27, 2009
Messages
41
Hi, I wonder if someone could help me please?

I need to hide 8 rows (30-37) based on a value in cell B28.

If the value is 2 then only show rows 30 and 31
If the value is 3 then only show rows 30, 31 and 32
Then continue this up to the user puts in the value of 8 and no rows are hidden.

Thanks for your help with this, it is much appreciated
 
Thanks again, The only reason why it didnt work was that the cell reference was changed to a text name so when the code was looking for B28 it could not find it due to the cell reference been changed to text.

Again Thanks for all your help!
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Okay, this one time - we'll forgive you. Totally kidding of course :) Glad its working for you and hope the "overwhelming" response didn't scare ya none too much! Personally I started laughing, as sometimes someone will get nary a response and will have to "bump", then the occassional "oh dear! the lights just dimmed when I checked for responses...!" happens.

You have a terrific day,

Mark
 
Upvote 0

Forum statistics

Threads
1,215,374
Messages
6,124,574
Members
449,173
Latest member
Kon123

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