Djani
05-23-2016, 12:20 AM
Dear all,
I have found a working code to hide rows based on a blank cell value, but I don't know how to modify it to my needs:
Sub HideRows()
Application.ScreenUpdating = False
For Each cl In Range("J6:J78")
If cl = "" And (cl.Row - 3) Mod 14 > 1 Then cl.EntireRow.Hidden = True
Next cl
End Sub
I want the macro to check the values in column J6:J78 and hide the entire row when it is a blank. However, in the picture below there are several empty rows in-between the tables. I don't want the macro to hide these, but keep them as it is.
http://i63.tinypic.com/2qxx21l.png
There are always 3 rows in-between tables as you can see in the above-mentioned picture.
Can anyone please help me out?
Many thanks in advance.
I have found a working code to hide rows based on a blank cell value, but I don't know how to modify it to my needs:
Sub HideRows()
Application.ScreenUpdating = False
For Each cl In Range("J6:J78")
If cl = "" And (cl.Row - 3) Mod 14 > 1 Then cl.EntireRow.Hidden = True
Next cl
End Sub
I want the macro to check the values in column J6:J78 and hide the entire row when it is a blank. However, in the picture below there are several empty rows in-between the tables. I don't want the macro to hide these, but keep them as it is.
http://i63.tinypic.com/2qxx21l.png
There are always 3 rows in-between tables as you can see in the above-mentioned picture.
Can anyone please help me out?
Many thanks in advance.