![]() |
Automatically hide a row if it is empty
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 |
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 |
All times are GMT +1. The time now is 03:14 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com