I am looking for a code to hide empty rows for a specific range of columns. I have a table starting in P9 to U71 and I would like a code to hide any row that does not contain any data in that specific table. I have tried several codes with the most recent posted below but this code is hiding based on the values in column U and even if there was data in that same row but in a different column. I should note that I have zero experience with coding and thus I thank you for any assistance with this issue.
Sub Worksheet_Activate() Dim r As Range, c As Range Set r = Range("q9:u71") Application.ScreenUpdating = False For Each c In r If Len(c.Text) = 0 Then c.EntireRow.Hidden = True Else c.EntireRow.Hidden = False End If Next c Application.ScreenUpdating = True End Sub