macca_18380
New Member
- Joined
- May 15, 2024
- Messages
- 22
- Office Version
- 365
Hi, Again please forgive my lack of understanding, i'm learning but still a good way to go.
I would to automatically hide rows in a spreadsheet if input cells within a range are blank. In this case if all cells in the range J8 to AC8 are blank i'd like to hide rows 11 to 96, so i was thinking a countif function would be appropriate, but it doesn't work. Any help on correcting this code, or anything else that would work, would be very helpful, thank you!
If Not Intersect(Target, Range("J8:AC8")) Is Nothing Then
If CountIf(Range("J8:AC8"), "") = 20 Then
Rows("11:96").Hidden = True
End If
End If
I would to automatically hide rows in a spreadsheet if input cells within a range are blank. In this case if all cells in the range J8 to AC8 are blank i'd like to hide rows 11 to 96, so i was thinking a countif function would be appropriate, but it doesn't work. Any help on correcting this code, or anything else that would work, would be very helpful, thank you!
If Not Intersect(Target, Range("J8:AC8")) Is Nothing Then
If CountIf(Range("J8:AC8"), "") = 20 Then
Rows("11:96").Hidden = True
End If
End If