以下で試してみてください。
Sub Test()
Dim mRow As Long, mCol As Long
Dim mCount As Long
Application.ScreenUpdating = False
For mRow = 2 To Cells(Rows.Count, "A").End(xlUp).Row
mCount = 0
For mCol = Columns("B:B").Column To Columns("H:H").Column
If Cells(mRow, mCol).Value <> "非番" Then
mCount = mCount + 1
If mCount = 4 Then
With Cells(mRow, mCol - 3).Resize(1, 4).Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Color = -16776961
End With
ElseIf mCount = 5 Then
With Cells(mRow, mCol - 4).Resize(1, 5).Borders(xlEdgeBottom)
.LineStyle = xlDouble
.Color = -16776961
End With
End If
Else
mCount = 0
End If
Next
Next
Application.ScreenUpdating = True
End Sub