#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default auto hide blank rows

Hi,

I want to hide blank row in between the data, which has formulas with
reference to other cell, the result could be blank or could have data. Is
there any way to auto hide the row if result is blank in that particular row.
This way it helps in reducing the length of the worksheet and looks better
for presentation.

Thanks,


Jameel
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default auto hide blank rows

Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
'Hide rows with formulas but no data
Dim cell As Range
Application.ScreenUpdating = False
With ActiveSheet.UsedRange
.Rows.Hidden = False
For Each cell In .Columns(1).SpecialCells(xlCellTypeFormulas)
If cell.Value = "" Or cell.Value = 0 Then cell.entirerow.Hidden = True
Next cell
End With
End Sub


Gord Dibben MS Excel MVP

On Sun, 12 Jul 2009 00:07:00 -0700, S A Jameel <S A
wrote:

Hi,

I want to hide blank row in between the data, which has formulas with
reference to other cell, the result could be blank or could have data. Is
there any way to auto hide the row if result is blank in that particular row.
This way it helps in reducing the length of the worksheet and looks better
for presentation.

Thanks,


Jameel


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
Macro to HIDE blank rows JForsyth Excel Worksheet Functions 6 June 5th 09 04:51 PM
Hide Blank Rows TamIam Excel Worksheet Functions 3 May 6th 09 08:42 PM
Auto Hide Blank Rows Gord Dibben Excel Discussion (Misc queries) 0 February 25th 09 08:52 PM
VBA code to hide blank rows ub Excel Worksheet Functions 4 July 31st 08 01:44 PM
Hide Blank Rows dee Excel Worksheet Functions 2 May 17th 06 11:30 PM


All times are GMT +1. The time now is 03:26 PM.

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"