LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default hiding rows containing formulas which return zero values

I use code to hide empty rows on a sheet. This works fine if the cells dont
have formulas in them and are empty.

However, if I use formulas in those rows which return blank cells, the code
doesnt hide the rows.

Even though the formulas in the cells return a zero value based upon
criteria, the rows wont hide.

Here is the code i use:

Dim rng As Range
On Error Resume Next
Range("a28:a54").EntireRow.Hidden = False
Set rng = Range("a28:a54").SpecialCells(xlBlanks)
On Error GoTo 0
If Not rng Is Nothing Then
rng.EntireRow.Hidden = True
End If


Can anyone suggest code which will hide the rows if the formulas in cells
a28 to a 54 return zero values?

Thanks,

Roger

 
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
Hiding rows with zero values [email protected] Excel Programming 2 December 29th 07 11:20 AM
Hiding Specific Rows Based on Values in Other Rows Chris Excel Worksheet Functions 1 November 2nd 06 08:21 PM
Hiding Rows with Formulas Ruan[_3_] Excel Programming 7 January 15th 04 12:07 AM
Hiding Rows with Zero or Blank Values Robin Excel Programming 0 July 30th 03 11:42 PM
Hiding Rows with Zero or Blank Values Robert Black Excel Programming 0 July 30th 03 11:21 PM


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