ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hide and unhide row when asking a question (https://www.excelbanter.com/excel-programming/426578-hide-unhide-row-when-asking-question.html)

Prossygk

Hide and unhide row when asking a question
 
I need a formula when the worksheet come up just three question shows. but
when the last question is asked and it is a true statement I would like
excell to show the rest of the rows but if the question is no then excell
keeps the rows hidden. For example

If Question 1 is Yes(True)- Keep rows 16 through 84 hidden
IF Question 2 is Yes(True) keep rows 16 through 84 hidden
If Question 3 is Yes(True) Undie rows 16 through 84.

Am I wishing on a pipe dream?

DStrong

Hide and unhide row when asking a question
 
This is possible using macros, the following code can be placed on the Sheet
that the questions on in the VBA code:


Private Sub Worksheet_Change(ByVal Target As Range)
If Range("D1").Text = "Yes" And Range("D2").Text = "Yes" And _
Range("D3").Text = "Yes" Then Rows("16:84").EntireRow.Hidden = False
Else _
Rows("16:84").EntireRow.Hidden = True
End Sub



You might want to place the code:

Rows("16:84").EntireRow.Hidden = True

in the workbook open statement to make sure that those rows are hidden when
the workbook opens.
As far as using a formula, I am not aware of a formula that can hide or
unhide rows or columns.

--
David
=Sub Let_me_ macronize_that_for_you!()
msgbox("Poof, it is done.")
End Sub


"Prossygk" wrote:

I need a formula when the worksheet come up just three question shows. but
when the last question is asked and it is a true statement I would like
excell to show the rest of the rows but if the question is no then excell
keeps the rows hidden. For example

If Question 1 is Yes(True)- Keep rows 16 through 84 hidden
IF Question 2 is Yes(True) keep rows 16 through 84 hidden
If Question 3 is Yes(True) Undie rows 16 through 84.

Am I wishing on a pipe dream?



All times are GMT +1. The time now is 05:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com