Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nick Turner
 
Posts: n/a
Default Conditional hiding of entire rows

Hi All

I was wondering if anybody knew how to hide an entire row or column based on
a stated condition using a specific cell elsewhere on the worksheet. I know
that it is possible to use [Format] Conditional Formatting to make the cell
appear empty, but I want to hide the entire row or column so that it no
longer appears on the worksheet. Is there a way to do this with or without
using VBA?

Thanks in advance and have a happy new year.

Nick
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Conditional hiding of entire rows

You could use autofilter to filter that condition, but that would not be
dynamic. Other than that VBA looks the best bet.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Nick Turner" wrote in message
...
Hi All

I was wondering if anybody knew how to hide an entire row or column based

on
a stated condition using a specific cell elsewhere on the worksheet. I

know
that it is possible to use [Format] Conditional Formatting to make the

cell
appear empty, but I want to hide the entire row or column so that it no
longer appears on the worksheet. Is there a way to do this with or

without
using VBA?

Thanks in advance and have a happy new year.

Nick



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nick Turner
 
Posts: n/a
Default Conditional hiding of entire rows

Thanks Bob

Yes, I thought VBA would be the best option as I need it to be dynamic. Any
Ideas on code to use? Do you know of any similar examples that I could view?

Cheers

Nick

"Bob Phillips" wrote:

You could use autofilter to filter that condition, but that would not be
dynamic. Other than that VBA looks the best bet.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Nick Turner" wrote in message
...
Hi All

I was wondering if anybody knew how to hide an entire row or column based

on
a stated condition using a specific cell elsewhere on the worksheet. I

know
that it is possible to use [Format] Conditional Formatting to make the

cell
appear empty, but I want to hide the entire row or column so that it no
longer appears on the worksheet. Is there a way to do this with or

without
using VBA?

Thanks in advance and have a happy new year.

Nick




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default Conditional hiding of entire rows

How would you want to identify which row(s) gets hidden when this cell
becomes a certain value?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Nick Turner" wrote in message
...
Thanks Bob

Yes, I thought VBA would be the best option as I need it to be dynamic.

Any
Ideas on code to use? Do you know of any similar examples that I could

view?

Cheers

Nick

"Bob Phillips" wrote:

You could use autofilter to filter that condition, but that would not be
dynamic. Other than that VBA looks the best bet.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Nick Turner" wrote in message
...
Hi All

I was wondering if anybody knew how to hide an entire row or column

based
on
a stated condition using a specific cell elsewhere on the worksheet.

I
know
that it is possible to use [Format] Conditional Formatting to make the

cell
appear empty, but I want to hide the entire row or column so that it

no
longer appears on the worksheet. Is there a way to do this with or

without
using VBA?

Thanks in advance and have a happy new year.

Nick






  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nick Turner
 
Posts: n/a
Default Conditional hiding of entire rows

Hi Bob

Thanks for the quick reply. The criteria I would use would be embedded
within formulas within Excel formulas. The output of these formulas would be
two cells which have a number representing the start row and end row for
hiding. I have mocked up some VBA code which seems to pass my preliminary
tests. Any suggestions or comments on my code? I'm a bit new to the VBA
side of Excel.

Sub HideEmptyRows()
Rows("23:35").EntireRow.Hidden = False
With Worksheets("A sent types")
firstrow = .Range("B40")
lastrow = .Range("B41")
For i = firstrow To lastrow
Rows(i).EntireRow.Hidden = True
Next i
End With
End Sub

I wanted to hide these rows in a dynamic manner because I am creating charts
with varying numbers of series. Now, whenever the entire row is hidden, it
is excluded from my chart, which is what I wanted. If you know of other ways
of excluding series from charts in a dynamic manner, that too would be
useful.

Thanks again. I have found your other posts on this site to me most useful
over a long period of time.

Nick


"Bob Phillips" wrote:

How would you want to identify which row(s) gets hidden when this cell
becomes a certain value?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Nick Turner" wrote in message
...
Thanks Bob

Yes, I thought VBA would be the best option as I need it to be dynamic.

Any
Ideas on code to use? Do you know of any similar examples that I could

view?

Cheers

Nick

"Bob Phillips" wrote:

You could use autofilter to filter that condition, but that would not be
dynamic. Other than that VBA looks the best bet.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Nick Turner" wrote in message
...
Hi All

I was wondering if anybody knew how to hide an entire row or column

based
on
a stated condition using a specific cell elsewhere on the worksheet.

I
know
that it is possible to use [Format] Conditional Formatting to make the
cell
appear empty, but I want to hide the entire row or column so that it

no
longer appears on the worksheet. Is there a way to do this with or
without
using VBA?

Thanks in advance and have a happy new year.

Nick






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 use conditional formatting on all rows based on data RYD@wolpofflaw Excel Discussion (Misc queries) 2 November 10th 05 05:29 PM
Hiding rows Caconz Excel Discussion (Misc queries) 1 August 18th 05 02:54 AM
Hiding of rows and columns srinivasan Excel Discussion (Misc queries) 1 July 21st 05 08:59 AM
HIDING ROWS IN PROTECTED WORKSHEETS kyoung Excel Discussion (Misc queries) 2 June 9th 05 05:17 AM
How to change an entire row using conditional formating John Edwards Excel Discussion (Misc queries) 2 December 9th 04 05:41 PM


All times are GMT +1. The time now is 07:22 PM.

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"