Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 155
Default hide row on spreadsheet

please advise if it is possible to hide a row if data is entered in a
specific cell within that row.As an example if I enter the text "Yes" in cell
D2, then row 2 must then be hidden !! Just a thought as I am creating a
spreadsheet to track items and once I have actioned a certain task I then
want to auto hide that item.

Thanx Graham
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 320
Default hide row on spreadsheet

Right-click the sheet tab, select View Code, enter this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 4 Then
If LCase(Target.Value) = "yes" Then
Target.EntireRow.Hidden = True
End If
End If
End Sub


"Graham" wrote in message
...
please advise if it is possible to hide a row if data is entered in a
specific cell within that row.As an example if I enter the text "Yes" in
cell
D2, then row 2 must then be hidden !! Just a thought as I am creating a
spreadsheet to track items and once I have actioned a certain task I then
want to auto hide that item.

Thanx Graham



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 155
Default hide row on spreadsheet

Thanks Bob,is it possible to create a command button (maybe2) where I would
click command button 1 to hide rows as per your code and also have a command
button 2 to retrieve/view all hidden data.

Thanx in advance
Graham

"Bob Umlas" wrote:

Right-click the sheet tab, select View Code, enter this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 4 Then
If LCase(Target.Value) = "yes" Then
Target.EntireRow.Hidden = True
End If
End If
End Sub


"Graham" wrote in message
...
please advise if it is possible to hide a row if data is entered in a
specific cell within that row.As an example if I enter the text "Yes" in
cell
D2, then row 2 must then be hidden !! Just a thought as I am creating a
spreadsheet to track items and once I have actioned a certain task I then
want to auto hide that item.

Thanx Graham




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 155
Default hide row on spreadsheet

Hi Bob thanks for the below...
I am using another code which reads
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("B:L")) Is Nothing Then
On Error Resume Next
Application.EnableEvents = False
If Not Target.HasFormula Then Target.Value =
UCase(Target.Value)
Application.EnableEvents = True
On Error GoTo 0
End If
Private Sub Worksheet_Change(ByVal Target As Range)
If End Sub

and i want to add your code , please advise how do i do this as i did paste
it in but I get an error "ambiguous name detected "


"Bob Umlas" wrote:

Right-click the sheet tab, select View Code, enter this:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 4 Then
If LCase(Target.Value) = "yes" Then
Target.EntireRow.Hidden = True
End If
End If
End Sub


"Graham" wrote in message
...
please advise if it is possible to hide a row if data is entered in a
specific cell within that row.As an example if I enter the text "Yes" in
cell
D2, then row 2 must then be hidden !! Just a thought as I am creating a
spreadsheet to track items and once I have actioned a certain task I then
want to auto hide that item.

Thanx Graham




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
Want to Hide columns in spreadsheet but NOT hide data in chart. KrispyData Charts and Charting in Excel 1 March 20th 09 04:45 PM
How can I hide certain data in a spreadsheet for certain users? ClaireB Excel Discussion (Misc queries) 1 December 17th 08 05:32 PM
How do you hide unused cells in a spreadsheet? riverdog Excel Discussion (Misc queries) 3 April 14th 08 04:54 PM
How do I hide a formula so it will not show on the spreadsheet? Brenda Excel Worksheet Functions 1 April 5th 06 02:14 PM
how do you hide the #DIV/0! in a blank spreadsheet? John Gentile Excel Discussion (Misc queries) 2 February 9th 06 10:02 PM


All times are GMT +1. The time now is 02:43 PM.

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"