Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Conditionally Hide Rows

HI All,

How do I conditionally rows if a certain cell = 0? For example, if
any cell within range BA5:BA37 =0 then hide row. Any help will be
appreciated. Thanks.

James

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Conditionally Hide Rows

How about just selecting that column and doing data|Filter|autofilter.

Then you can show cells not equal to 0.

wrote:

HI All,

How do I conditionally rows if a certain cell = 0? For example, if
any cell within range BA5:BA37 =0 then hide row. Any help will be
appreciated. Thanks.

James


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Conditionally Hide Rows

On May 11, 9:03 am, Dave Peterson wrote:
How about just selecting that column and doing data|Filter|autofilter.

Then you can show cells not equal to 0.

wrote:

HI All,


How do I conditionally rows if a certain cell = 0? For example, if
any cell within range BA5:BA37 =0 then hide row. Any help will be
appreciated. Thanks.


James


--

Dave Peterson


Thanks for the help, but I've tried that and it does not refresh when
I import new data. I'm looking for something that updates when I
import new data. Thanks for you help so far.

  #4   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Conditionally Hide Rows

If you are importing your data with MSQuery, then do it with a macro and
include the Filtering feature Dave described.

Vaya con Dios,
Chuck, CABGx3



" wrote:

On May 11, 9:03 am, Dave Peterson wrote:
How about just selecting that column and doing data|Filter|autofilter.

Then you can show cells not equal to 0.

wrote:

HI All,


How do I conditionally rows if a certain cell = 0? For example, if
any cell within range BA5:BA37 =0 then hide row. Any help will be
appreciated. Thanks.


James


--

Dave Peterson


Thanks for the help, but I've tried that and it does not refresh when
I import new data. I'm looking for something that updates when I
import new data. Thanks for you help so far.


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,069
Default Conditionally Hide Rows

You could use a macro with a Worksheet_Change event like the following:

Private Sub Worksheet_Change(ByVal Target As Range)
Const MyRng = "BA5:BA37"
Dim c As Range
For Each c In Range(MyRng)
If c.Address = Target.Address Then
If Target.Value = 0 Then
Target.EntireRow.Hidden = True
Else
Target.EntireRow.Hidden = False
End If
End If
Next c
End Sub

Right-click on the tab of the sheet where you want to use this, then select
"View code". Paste the function into the worksheet code module when the VB
Editor appears.

Hope this helps,

Hutch

" wrote:

HI All,

How do I conditionally rows if a certain cell = 0? For example, if
any cell within range BA5:BA37 =0 then hide row. Any help will be
appreciated. Thanks.

James




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default Conditionally Hide Rows

Should I select the drop drop in "General" or "Worksheet"? Thanks.

James


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,069
Default Conditionally Hide Rows

Worksheet. A "Worksheet_SelectionChange" subroutine may appear by default
with no code. Ignore it and paste the code I sent in the same module below it.

Hutch

" wrote:

Should I select the drop drop in "General" or "Worksheet"? Thanks.

James



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
Way to conditionally hide rows? Cuda Excel Worksheet Functions 3 November 10th 06 03:18 PM
a way to conditionally hide tabs in a range JWR Excel Discussion (Misc queries) 3 July 3rd 06 08:05 PM
Is there a way to conditionally hide a row? Maxwell Sprinkler Excel Discussion (Misc queries) 1 June 1st 05 12:56 AM
Conditionally Hide Rows tamato43 Excel Discussion (Misc queries) 4 May 11th 05 04:27 PM
Excel - if cells = 0, how to conditionally hide rows in chart fineimage Excel Worksheet Functions 1 November 11th 04 09:45 PM


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