Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 105
Default Automatically hide a row if it is empty

Hi.
Paste the following code in the sheet module. It's assuming to check
formulae from cells A5:A10.

Private Sub Worksheet_Calculate()
Application.EnableEvents = False
For i = 5 To 10
If Cells(i, 1) = "" And Cells(i, 1).HasFormula Then
Rows(i).Hidden = True
Else
Rows(i).Hidden = False
End If
Next i
Application.EnableEvents = True
End Sub

HTH
Daniel

Hi,

I would like Excel to hide a couple of rows if a formula input in the cells
of that row results in "" and show them if the formula shows numbers. Has
anyone worked out how to do it?

Thanks
Steve



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 automatically hide empty columns in Excel? Ned Mains Excel Discussion (Misc queries) 3 April 29th 23 07:44 PM
Hide the line when cell B is empty Christine Excel Discussion (Misc queries) 4 August 1st 08 05:25 PM
Is there a way to automatically hide empty rows? Christine Excel Worksheet Functions 1 April 12th 07 10:22 PM
Hide Empty Rows When Printing Bob Excel Worksheet Functions 5 August 20th 05 12:57 PM
Format to hide empty rows tamato43 Excel Discussion (Misc queries) 4 May 10th 05 10:16 PM


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