Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default Unhide row based on cell value

Hi

Is it possible to unhide a row based on the value of a cell?

I am creating a questionnaire and would like to unhide a question if a
certain answer is given. For example:

Cell A1 - 'Question: Do you have a criminal record? Yes/No'

If answer is Yes then a further question appears in B1 - 'Please provide
details'. If answer was no then this will not appear.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default Unhide row based on cell value

Hi
Assuming your Yes/No is a form button, then in the attached macro you
would put

Range("B1").EntireRow.Visible = True

regards
Paul
chris wrote:
Hi

Is it possible to unhide a row based on the value of a cell?

I am creating a questionnaire and would like to unhide a question if a
certain answer is given. For example:

Cell A1 - 'Question: Do you have a criminal record? Yes/No'

If answer is Yes then a further question appears in B1 - 'Please provide
details'. If answer was no then this will not appear.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Unhide row based on cell value


You can program this in your thisWorkbook module as an event handler
procedure

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal
Target As Range)

If ActiveSheet.Range("a1").Value = "Yes" Then
ActiveSheet.Range("a2").EntireRow.Hidden = False
End If

End Sub

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 788
Default Unhide row based on cell value

Paul - I was just planning on using a drop down arrow.

i.e. if the question was in row 1 and 'No' was answered a question would
then appear.

" wrote:

Hi
Assuming your Yes/No is a form button, then in the attached macro you
would put

Range("B1").EntireRow.Visible = True

regards
Paul
chris wrote:
Hi

Is it possible to unhide a row based on the value of a cell?

I am creating a questionnaire and would like to unhide a question if a
certain answer is given. For example:

Cell A1 - 'Question: Do you have a criminal record? Yes/No'

If answer is Yes then a further question appears in B1 - 'Please provide
details'. If answer was no then this will not appear.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 789
Default Unhide row based on cell value

Then Bobbo's sub is the way to go
Paul

chris wrote:
Paul - I was just planning on using a drop down arrow.

i.e. if the question was in row 1 and 'No' was answered a question would
then appear.

" wrote:

Hi
Assuming your Yes/No is a form button, then in the attached macro you
would put

Range("B1").EntireRow.Visible = True

regards
Paul
chris wrote:
Hi

Is it possible to unhide a row based on the value of a cell?

I am creating a questionnaire and would like to unhide a question if a
certain answer is given. For example:

Cell A1 - 'Question: Do you have a criminal record? Yes/No'

If answer is Yes then a further question appears in B1 - 'Please provide
details'. If answer was no then this will not appear.






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide or unhide sheets based on cell billinr Excel Discussion (Misc queries) 2 July 13th 07 07:42 PM
Hide or Unhide certain columns based on a cell value [email protected] Excel Programming 1 July 10th 06 10:17 AM
Hide or Unhide Column Based on Cell Value windsurferLA Excel Programming 2 March 31st 06 11:06 PM
Hide/Unhide column based on cell value DRK Excel Programming 2 August 8th 05 04:17 PM
Unhide sheets based on a cell value Tim[_36_] Excel Programming 6 April 30th 04 02:57 AM


All times are GMT +1. The time now is 09:17 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"