Hello,
I found a post for hiding rows that are blank (but contain a formula) but I cannot find a code that automatically unhides rows when the formula results in text populating.
This is the 'hiding row' code I am using:
Sub hide()
Dim lr As Long, e As Range
lr = Range("A" & Rows.Count).End(xlUp).Row
On Error Resume Next
For Each e In Range("A1:A" & lr).SpecialCells(xlFormulas)
If Len(e) = 0 Then Rows(e.Row).Hidden = True
Next
On Error GoTo 0
End Sub
Is there a way to automatically have the workbook recalculate rows on all worksheets to hide/ unhide when the response to the corresponding formula populates data in a row?
A little more info... I have a tab labeled 'coversheet' in which there are yes/no pulldowns. When someone chooses 'yes' on that worksheet, data automatically pulls into rows in another worksheet labeled "department 1" from a separate worksheet containing data labeled 'data input'. So what I'm looking to do is have rows hide/unhide on each 'department' sheet when answers are changed from yes/no in the 'coversheet. Please help and thanks!!
I found a post for hiding rows that are blank (but contain a formula) but I cannot find a code that automatically unhides rows when the formula results in text populating.
This is the 'hiding row' code I am using:
Sub hide()
Dim lr As Long, e As Range
lr = Range("A" & Rows.Count).End(xlUp).Row
On Error Resume Next
For Each e In Range("A1:A" & lr).SpecialCells(xlFormulas)
If Len(e) = 0 Then Rows(e.Row).Hidden = True
Next
On Error GoTo 0
End Sub
Is there a way to automatically have the workbook recalculate rows on all worksheets to hide/ unhide when the response to the corresponding formula populates data in a row?
A little more info... I have a tab labeled 'coversheet' in which there are yes/no pulldowns. When someone chooses 'yes' on that worksheet, data automatically pulls into rows in another worksheet labeled "department 1" from a separate worksheet containing data labeled 'data input'. So what I'm looking to do is have rows hide/unhide on each 'department' sheet when answers are changed from yes/no in the 'coversheet. Please help and thanks!!