hi - when i step through this code i found it hides all the rows in column a4:a50 that have nothing in them (they contain formulas, but cell is blank) but when i call the code as part of another macro it hides every row in a4:a50 regardless if it has values.
every row in that range has a formula, but if a4:50 is blank then the rest of the columns are blank too.
every row in that range has a formula, but if a4:50 is blank then the rest of the columns are blank too.
Code:
Sub hiderows()
Worksheets("Layout").Activate
Dim c As Range
Rows("4:50").EntireRow.Hidden = False
'rehide the blanks
For Each c In Range("a4:a50")
If c.Value = "" Then
c.EntireRow.Hidden = True
Else
'do nothing, can resinstate the command below, but not required
c.EntireRow.Hidden = False
End If
Next
End Sub