Hi guys,
I am completely new this forum, hope I can learn a lot from you guys especially when it comes to VBA.
I have a simple working button which will hide some rows within a range if a column value is empty or 0.
For the working code, see below:
Sub HideUnhidej()
Dim cell As Range
For Each cell In Range("D8:D18, D23:D29")
If IsNumeric(cell) Then
cell.EntireRow.Hidden = cell.Value = 0
End If
Next cell
End Sub
What I want to achieve is that once I click the same button again, the hidden rows will be unhidden again so I can edit them if necessary.
I am struggling with an Else script but so far I did not result in the solution. I hope anybody could help me out.
Thank you in advance and kind regards,
Wesley
Bookmarks