Strange problem.

If I change your code:

Sub replcnetwork()
Dim i As Long
With Sheets("pivot")
    For i = 2 To Range("S" & Rows.Count).End(xlUp).Row Step 1
adding a range select comand:

Sub replcnetwork()
Dim i As Long
With Sheets("pivot")
Range("S2").Select
    For i = 2 To Range("S" & Rows.Count).End(xlUp).Row Step 1
you can loop through all the case statment so perhaps your code will work with this modification.

HTH

Alf