Quote Originally Posted by stnkynts View Post
Try this:

Sub Summary()
Dim ws As Worksheet:    Set ws = Sheets("Statement of Profit & Loss")
Dim LR As Long
Dim rCell As Range

LR = ws.Range("E" & Rows.Count).End(xlUp).Row

For Each rCell In ws.Range("E1:E" & LR)
    If Not InStr(1, rCell.Value, "[Tx]") = 0 Then
        With rCell.EntireRow.Borders(xlEdgeTop)
            .LineStyle = xlContinuous
            .Weight = xlThin
        End With
        With rCell.EntireRow.Borders(xlEdgeBottom)
            .LineStyle = xlContinuous
            .Weight = xlMedium
        End With
    ElseIf Not InStr(1, rCell.Value, "[H]") = 0 Then
        rCell.Offset(, -1).Clear
        rCell.Offset(, -4).Clear
        rCell.Offset(, 1).Clear
        rCell.Offset(, 4).Clear
    ElseIf IsEmpty(rCell) Then
        rCell.EntireRow.Clear
    End If
Next rCell

End Sub

Hi stnkynts,
Thanks for the code this works, could the last column used be include to replace EntireRow for the cell borders formatting, apologies I should have included this is my initial request?