How to modify this code so that it actually adds to the list of results rather than replace:
Code:
Sub EncID_IP()
'.:: Extract EncID
'
Dim lRow As Long ' East to West
Dim bCount As Byte '1,2,3
Dim sServiceHit As String 'Service used to find EncID
Dim rRange As Range, rCell As Range 'What am I cycling through?
Dim ws As Worksheet 'Canvas
Sheets("IP Breakout").Select
Set ws = Sheets("Results IP") 'dumping ground
ws.Range("A1") = "EncID" 'extract data
Set rRange = Range("A2", Range("A" & Rows.Count).End(xlUp)) 'Create a dynamic range to search
lRow = 2 ' go to 2 deep
For Each rCell In rRange 'look at every cell in the dynamic range
If sServiceHit <> rCell.Offset(, 4) Then
sServiceHit = rCell.Offset(, 4)
bCount = 0
End If
If bCount < 2 Then ' if X < 2
ws.Cells(lRow, "A") = rCell 'Canvas cell A + X
bCount = bCount + 1 'Add to my count by 1
lRow = lRow + 1 ' Add to my row by 1
End If
Next rCell
End Sub