Hi all,
I'm brand new to VBA coding in Excel, and I'm looking to hide/unhide rows based on user responses.
If the user responds '0' in cell G5, I want to hide row 6. If the user responds any number greater than '0', I want to unhide row 6.
Additionally, if the user responds '0' in cell G19, I want to hide rows 20 to 39. If the user responds '1' in cell G19, I want to hide rows 22 to 39. If the user responds '2' in cell G19, I want to hide rows 24 to 39. If the user responds '3' in cell G19, I want to hide rows 26 to 39. If the user responds '4' in cell G19, I want to hide rows 28 to 39. If the user responds '5' in cell G19, I want to hide rows 30 to 39. If the user responds '6' in cell G19, I want to hide rows 32 to 39. If the user responds '7' in cell G19, I want to hide rows 34 to 39. If the user responds '8' in cell G19, I want to hide rows 36 to 39. If the user responds '9' in cell G19, I want to hide rows 38 to 39. And the user responds '10' in cell G19, I want rows 20 to 39 unhidden.
Any help is much appreciated.
I'm brand new to VBA coding in Excel, and I'm looking to hide/unhide rows based on user responses.
If the user responds '0' in cell G5, I want to hide row 6. If the user responds any number greater than '0', I want to unhide row 6.
Additionally, if the user responds '0' in cell G19, I want to hide rows 20 to 39. If the user responds '1' in cell G19, I want to hide rows 22 to 39. If the user responds '2' in cell G19, I want to hide rows 24 to 39. If the user responds '3' in cell G19, I want to hide rows 26 to 39. If the user responds '4' in cell G19, I want to hide rows 28 to 39. If the user responds '5' in cell G19, I want to hide rows 30 to 39. If the user responds '6' in cell G19, I want to hide rows 32 to 39. If the user responds '7' in cell G19, I want to hide rows 34 to 39. If the user responds '8' in cell G19, I want to hide rows 36 to 39. If the user responds '9' in cell G19, I want to hide rows 38 to 39. And the user responds '10' in cell G19, I want rows 20 to 39 unhidden.
Any help is much appreciated.