Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default How do I display certain lines depnding on a cell critrera

I have two options to select from and only one of the options can be
selected, lets call it A1 and A2.

If a person selects A1, I would like to view only lines 10 - 20, however if
a person selects A2, I would like to view only lines 20 - 40.

Greg

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default How do I display certain lines depnding on a cell critrera

Hi,

right click your sheet tab, view code and paste this in and try selecting A1
or A2

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Select Case Target.Address
Case Is = ("$A$1")
Rows("10:20").EntireRow.Hidden = True
Rows("21:40").EntireRow.Hidden = False
Case Is = ("$A$2")
Rows("10:20").EntireRow.Hidden = False
Rows("21:40").EntireRow.Hidden = True
End Select
End Sub


Mike

"Greg S" wrote:

I have two options to select from and only one of the options can be
selected, lets call it A1 and A2.

If a person selects A1, I would like to view only lines 10 - 20, however if
a person selects A2, I would like to view only lines 20 - 40.

Greg

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
How do I display lines depnding on a cell critrera Greg S Excel Worksheet Functions 3 October 15th 08 02:39 PM
Display multiple lines of text within a cell from multiple column. Zeeshan Zaheer Excel Worksheet Functions 3 August 23rd 06 10:08 AM
Display more than 8 lines in an Excel dropdown box Brettjg Excel Discussion (Misc queries) 3 June 14th 06 11:23 AM
How do I resize a cell in Excel to display two lines of data alanb Excel Discussion (Misc queries) 2 December 14th 05 05:45 PM
display multiple lines of text within a merged cell automatically sssizemore Excel Worksheet Functions 1 June 15th 05 02:30 AM


All times are GMT +1. The time now is 04:05 AM.

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

About Us

"It's about Microsoft Excel"