I have worktables that I have formatted to hide rows based on data found in the table. Some of the rows have parts A,B,C and D. for instance perhaps I have 100 rows, but only 25 individual items as they all have parts A,B,C, and D. Is there a way to match the case based on the last letter of the cell contents?
is there a way to modify this so that if 10 B is not hidden, to also make sure that 10 A, C and D are not hidden either? Thank you
Code:
Sub report2()
Dim i As Integer
Dim j As Integer
For i = 7 To 69
If Cells(i, 5) > -1 And Cells(i, 5) < 1 And Cells(i, 8) > -1 And Cells(i, 8) < 1 And Cells(i, 11) > -1 And Cells(i, 11) < 1 And Cells(i, 14) > -1 And Cells(i, 14) < 1 Then
Cells(i, 5).EntireRow.Hidden = True
ElseIf Cells(i, 5) = "n/a" Then
Cells(i, 5).EntireRow.Hidden = True
ElseIf Cells(i, 8) = "n/a" Then
Cells(i, 8).EntireRow.Hidden = True
ElseIf Cells(i, 11) = "n/a" Then
Cells(i, 11).EntireRow.Hidden = True
ElseIf Cells(i, 14) = "n/a" Then
Cells(i, 14).EntireRow.Hidden = True
For j = 1 To 69
With Cells(j, 1).Font
If .Strikethrough = True Then
Cells(j, 1).EntireRow.Hidden = True
End If
End With
Next
End If
Next i
End Sub