#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Hide Cells

i want a program to search through column A and when it hits the first value
of 9999, if will turn the RowHeight to 0 (starting at the next row) until it
reaches the the next value of 9999

help please
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Hide Cells

Hi lawson

Sub Example()
Dim Firstrow As Long
Dim Lastrow As Long
Dim Lrow As Long
Dim CalcMode As Long

With Application
CalcMode = .Calculation
.Calculation = xlCalculationManual
.ScreenUpdating = False
End With

Firstrow = ActiveSheet.UsedRange.Cells(1).Row
Lastrow = ActiveSheet.UsedRange.Rows.Count + Firstrow - 1
With ActiveSheet
.DisplayPageBreaks = False
For Lrow = Lastrow To Firstrow Step -1
If IsError(.Cells(Lrow, "A").Value) Then
'Do nothing, This avoid a error if there is a error in the cell

ElseIf .Cells(Lrow, "A").Value = "999" Then .Rows(Lrow).Hidden = True

End If
Next
End With
With Application
.ScreenUpdating = True
.Calculation = CalcMode
End With
End Sub

My Add-in have this option
Maybe you like it
http://www.rondebruin.nl/easyfilter.htm



--
Regards Ron de Bruin
http://www.rondebruin.nl


"lawson" wrote in message ...
i want a program to search through column A and when it hits the first value
of 9999, if will turn the RowHeight to 0 (starting at the next row) until it
reaches the the next value of 9999

help please



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 show/hide cells depending on other cells results Marco Excel Discussion (Misc queries) 0 August 15th 06 06:21 PM
Cannot hide cells craig New Users to Excel 7 May 9th 05 10:11 PM
How do I create an IF function to hide cells in column B IF cells. nlw2 Excel Programming 1 October 25th 04 06:43 PM
How do I create an IF function to hide cells in column B IF cells. nlw2 Excel Programming 0 October 25th 04 06:39 PM
How do I create an IF function to hide cells in column B IF cells. nlw2 Excel Programming 0 October 25th 04 06:39 PM


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