Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JAZ JAZ is offline
external usenet poster
 
Posts: 10
Default hiding rows or columns

hello there
i wonder if anybody could help me with this

is there a way probably macro that hides rows or columns if a specific
number is entered on A1 for example?
many thanks
jez
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default hiding rows or columns

Sure, Details???

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jaz" wrote in message
...
hello there
i wonder if anybody could help me with this

is there a way probably macro that hides rows or columns if a specific
number is entered on A1 for example?
many thanks
jez


  #3   Report Post  
Posted to microsoft.public.excel.programming
JAZ JAZ is offline
external usenet poster
 
Posts: 10
Default hiding rows or columns

yes, i have some rows that i want to be displayed only by a member in one sheet
all of them have account codes eg: 1, 2, 3 on b3
i have created a list which allows them to enter the account code so i want
something that once account number 1 is selected from the list then it will
hide or unhide the rows that belongs to the acc 1, preferably unhide
memebers are up to 40 so it would be esential to unhide instead

cheers
jez

"Don Guillett" wrote:

Sure, Details???

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jaz" wrote in message
...
hello there
i wonder if anybody could help me with this

is there a way probably macro that hides rows or columns if a specific
number is entered on A1 for example?
many thanks
jez



  #4   Report Post  
Posted to microsoft.public.excel.programming
Jez Jez is offline
external usenet poster
 
Posts: 38
Default hiding rows or columns

or to make it more clear:
if account 1 is selected then unhide or hide rows 40,41
thanks in advance
jez

"Don Guillett" wrote:

Sure, Details???

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jaz" wrote in message
...
hello there
i wonder if anybody could help me with this

is there a way probably macro that hides rows or columns if a specific
number is entered on A1 for example?
many thanks
jez



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default hiding rows or columns

Right click sheet tabview codeinsert thismodify to suit

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("a1").Address Then
Dim x As String
Rows.Hidden = False 'Visible = True
Select Case Target
Case 1: x = "40:41"
Case 2: x = "4:8"


Case Else
Exit Sub
End Select
Rows(x).Hidden = True
End If
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jez" wrote in message
...
or to make it more clear:
if account 1 is selected then unhide or hide rows 40,41
thanks in advance
jez

"Don Guillett" wrote:

Sure, Details???

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jaz" wrote in message
...
hello there
i wonder if anybody could help me with this

is there a way probably macro that hides rows or columns if a specific
number is entered on A1 for example?
many thanks
jez






  #6   Report Post  
Posted to microsoft.public.excel.programming
Jez Jez is offline
external usenet poster
 
Posts: 38
Default hiding rows or columns

don
i did try this but could not get it working

more specific is this:
if cell J3="58" then unhide rows 82-97 otherwise hide them
i need to unhide it only for this account code
many thanks
jez


"Don Guillett" wrote:

Right click sheet tabview codeinsert thismodify to suit

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("a1").Address Then
Dim x As String
Rows.Hidden = False 'Visible = True
Select Case Target
Case 1: x = "40:41"
Case 2: x = "4:8"


Case Else
Exit Sub
End Select
Rows(x).Hidden = True
End If
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jez" wrote in message
...
or to make it more clear:
if account 1 is selected then unhide or hide rows 40,41
thanks in advance
jez

"Don Guillett" wrote:

Sure, Details???

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jaz" wrote in message
...
hello there
i wonder if anybody could help me with this

is there a way probably macro that hides rows or columns if a specific
number is entered on A1 for example?
many thanks
jez




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default hiding rows or columns

Make sure it's in the sheet module of the desired sheet.
If your cell value is a number don't use the " "
Try this. If all else fails, send your wb to my address below

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("j3").Address Then
Dim x As String
Rows.Hidden = True
Select Case Target
Case 53: x = "82:97"
' Case 2: x = "4:8"
Case Else
Exit Sub
End Select
Rows(x).Hidden = false
End If
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jez" wrote in message
...
don
i did try this but could not get it working

more specific is this:
if cell J3="58" then unhide rows 82-97 otherwise hide them
i need to unhide it only for this account code
many thanks
jez


"Don Guillett" wrote:

Right click sheet tabview codeinsert thismodify to suit

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("a1").Address Then
Dim x As String
Rows.Hidden = False 'Visible = True
Select Case Target
Case 1: x = "40:41"
Case 2: x = "4:8"


Case Else
Exit Sub
End Select
Rows(x).Hidden = True
End If
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jez" wrote in message
...
or to make it more clear:
if account 1 is selected then unhide or hide rows 40,41
thanks in advance
jez

"Don Guillett" wrote:

Sure, Details???

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jaz" wrote in message
...
hello there
i wonder if anybody could help me with this

is there a way probably macro that hides rows or columns if a
specific
number is entered on A1 for example?
many thanks
jez





  #8   Report Post  
Posted to microsoft.public.excel.programming
Jez Jez is offline
external usenet poster
 
Posts: 38
Default hiding rows or columns

it does work very well indeed thank you very much
thank you

"Don Guillett" wrote:

Make sure it's in the sheet module of the desired sheet.
If your cell value is a number don't use the " "
Try this. If all else fails, send your wb to my address below

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("j3").Address Then
Dim x As String
Rows.Hidden = True
Select Case Target
Case 53: x = "82:97"
' Case 2: x = "4:8"
Case Else
Exit Sub
End Select
Rows(x).Hidden = false
End If
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jez" wrote in message
...
don
i did try this but could not get it working

more specific is this:
if cell J3="58" then unhide rows 82-97 otherwise hide them
i need to unhide it only for this account code
many thanks
jez


"Don Guillett" wrote:

Right click sheet tabview codeinsert thismodify to suit

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("a1").Address Then
Dim x As String
Rows.Hidden = False 'Visible = True
Select Case Target
Case 1: x = "40:41"
Case 2: x = "4:8"


Case Else
Exit Sub
End Select
Rows(x).Hidden = True
End If
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jez" wrote in message
...
or to make it more clear:
if account 1 is selected then unhide or hide rows 40,41
thanks in advance
jez

"Don Guillett" wrote:

Sure, Details???

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jaz" wrote in message
...
hello there
i wonder if anybody could help me with this

is there a way probably macro that hides rows or columns if a
specific
number is entered on A1 for example?
many thanks
jez






  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default hiding rows or columns

Glad to help

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jez" wrote in message
...
it does work very well indeed thank you very much
thank you

"Don Guillett" wrote:

Make sure it's in the sheet module of the desired sheet.
If your cell value is a number don't use the " "
Try this. If all else fails, send your wb to my address below

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("j3").Address Then
Dim x As String
Rows.Hidden = True
Select Case Target
Case 53: x = "82:97"
' Case 2: x = "4:8"
Case Else
Exit Sub
End Select
Rows(x).Hidden = false
End If
End Sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jez" wrote in message
...
don
i did try this but could not get it working

more specific is this:
if cell J3="58" then unhide rows 82-97 otherwise hide them
i need to unhide it only for this account code
many thanks
jez


"Don Guillett" wrote:

Right click sheet tabview codeinsert thismodify to suit

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("a1").Address Then
Dim x As String
Rows.Hidden = False 'Visible = True
Select Case Target
Case 1: x = "40:41"
Case 2: x = "4:8"


Case Else
Exit Sub
End Select
Rows(x).Hidden = True
End If
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jez" wrote in message
...
or to make it more clear:
if account 1 is selected then unhide or hide rows 40,41
thanks in advance
jez

"Don Guillett" wrote:

Sure, Details???

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"jaz" wrote in message
...
hello there
i wonder if anybody could help me with this

is there a way probably macro that hides rows or columns if a
specific
number is entered on A1 for example?
many thanks
jez







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
Hiding rows and columns in XL 07 mlenard New Users to Excel 3 August 31st 09 05:42 PM
hiding columns with merged rows Cormac Excel Discussion (Misc queries) 3 June 5th 08 01:29 PM
Hiding Rows and Columns SmartyPants Excel Programming 5 October 19th 06 08:16 PM
Hiding rows and columns matelot Excel Programming 6 December 14th 05 06:56 PM
Hiding of rows and columns srinivasan Excel Discussion (Misc queries) 1 July 21st 05 08:59 AM


All times are GMT +1. The time now is 05:36 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"