dwharrington
New Member
- Joined
- Dec 4, 2015
- Messages
- 1
The old thread here on Mr. Excel does mostly what I want to do: hide rows WITHOUT Macros in Excel.
However, I want to do something a little more expansive. I know nothing about VBA, so I need a little help, as I tried to add multiple criteria to the code above and it didn't work.
I have a complex sheet I am creating to calculate space in buildings, and it would be useful to expand/contract the size of it based on the number of buildings the user wants to examine at once: 1-5.
Therefore, an input of 1 in a certain cell should hide two sets of rows; an input of 2 would hide two different sets of rows; and so on.
I'll lay out the logic, and any input would be appreciated. I could learn a lot from this:
If F3= "", then nothing is hidden
If F3= 1, then rows 9:28 and rows 48:98 are hidden
If F3= 2, then rows 14:28 and rows 61:98 are hidden
If F3= 3, then rows 19:28 and rows 74:98 are hidden
If F3= 4, then rows 24:28 and rows 87:98 are hidden
If F3= 5, then nothing is hidden
However, I want to do something a little more expansive. I know nothing about VBA, so I need a little help, as I tried to add multiple criteria to the code above and it didn't work.
I have a complex sheet I am creating to calculate space in buildings, and it would be useful to expand/contract the size of it based on the number of buildings the user wants to examine at once: 1-5.
Therefore, an input of 1 in a certain cell should hide two sets of rows; an input of 2 would hide two different sets of rows; and so on.
I'll lay out the logic, and any input would be appreciated. I could learn a lot from this:
If F3= "", then nothing is hidden
If F3= 1, then rows 9:28 and rows 48:98 are hidden
If F3= 2, then rows 14:28 and rows 61:98 are hidden
If F3= 3, then rows 19:28 and rows 74:98 are hidden
If F3= 4, then rows 24:28 and rows 87:98 are hidden
If F3= 5, then nothing is hidden