Change ActiveCell in a loop
<p>I have an Excel file from a third party that I wrote a macro to manipulate.</p>

<p>The macro needs to grab a technician's name and insert it prior to each service 
listed in the row per client.</p>

<p>The excel file is set up as follows.</p>

<p>|RowID|ClientID|CLname|CFname|TLname|TFname|Location|date|Serv|ServDur|ServID|Cost|</p>

<p>Each row has 1 unique client, multiple technicians, each technician can have multiple services.</p>

<p>My macro runs with no errors, yet it makes no changes. </p>

<pre><code>Sub UpdateText()
' UpdateText Macro
' Keyboard Shortcut: Ctrl+Shift+D

Dim fName As String
Dim lName As String
Dim LastRow As Long
Dim LastCell As Long
Dim i As Long
Dim x As Long
LastRow = Cells(Rows.Count, 1).End(xlUp).Row

For i = 1 To LastRow
    LastCell = Range("IV1").End(xlToLeft).Column
    For x = 1 To LastCell
        If ActiveCell = "Location" Then
            lName = ActiveCell.Offset(0, -2).Value
            fName = ActiveCell.Offset(0, -1).Value
        ElseIf ActiveCell.Value Like "HC:H*" Then
            Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
            Selection.Insert Shift:=xlToRight, CopyOrigin:=xlFormatFromLeftOrAbove
            ActiveCell.Value = lName
            ActiveCell.Offset(0, 1).Value = fName
            ActiveCell.Offset(0, 3).Select
        End If
    Next x
Next i

End Sub
</code></pre>

<p>The active cell doesn't move along with the For statement. Meaning the Active Cell is always A1.   </p>