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