I have the code for hiding the rows base on empty columns. However, the code only looks at numbers like 1, 2, 3, 4, 5 etc. Could anyone suggest me a way to modify this code so it looks for characters like A, B, C, O etc.. instead of number/value base.
Sub HideEmptyRows()
Dim HiddenRow&, RowRange As Range, RowRangeValue&
'*****************************
'< Set the 1st & last rows to be hidden >
Const FirstRow As Long = 11
Const LastRow As Long = 254
'< Set your columns that contain data >
Const FirstCol As String = "P"
Const LastCol As String = "AV"
'*****************************
ActiveWindow.DisplayZeros = False
Application.ScreenUpdating = False
For HiddenRow = FirstRow To LastRow
'(we're using columns P to AV here)
Set RowRange = Range(FirstCol & HiddenRow & _
":" & LastCol & HiddenRow)
'sums the entries in cells in the RowRange
RowRangeValue = Application.Sum(RowRange.Value)
If RowRangeValue <> 0 Then
'there's something in this row - don't hide
Rows(HiddenRow).EntireRow.Hidden = False
Else
'there's nothing in this row yet - hide it
Rows(HiddenRow).EntireRow.Hidden = True
End If
Next HiddenRow
Application.ScreenUpdating = True
End Sub