Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default hide range of rows based on another cell condition

I want to hide rows 5-30 if cell (I8) is empty.
any thoughts?
Thank you.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default hide range of rows based on another cell condition

sub hideem()
if len(application.trim(range("i8")))<1 then
rows ("5:30").hidden=true
end if
end sub


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"DarrenL" wrote in message
...
I want to hide rows 5-30 if cell (I8) is empty.
any thoughts?
Thank you.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default hide range of rows based on another cell condition

Try this:
Sub Hide()
If Range("I8") = "" Then
Rows("5:30").RowHeight = 0
End If
End Sub


Sub Unhide()

Cells.Select
Selection.RowHeight = 12.75
End Sub

HTH,
Ryan---

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"DarrenL" wrote:

I want to hide rows 5-30 if cell (I8) is empty.
any thoughts?
Thank you.

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
Hide a sheet based on a cell condition noord453 Excel Programming 4 April 16th 09 12:05 PM
hide multiple rows based on condition within rows Skymann Excel Programming 6 October 21st 07 04:01 PM
hide rows where cell condition is not met amaries Excel Worksheet Functions 1 January 9th 07 06:50 PM
Hide rows based on a condition KimberlyH Excel Programming 2 March 29th 06 09:03 PM
Is there a way to hide worksheets and/or rows/columns based on information enter into a particular cell of range of cells? Marc New Users to Excel 1 March 10th 06 05:10 PM


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