Hello,

I am trying to copy the values from a pivot table into the adjacent column. My current code works fine, but it ends the loop at row 35. I cannot figure out why. The only reason the extra "Do" loop is in there is because I thought it could help... it doesn't.

Sub Copy_and_Paste_Loop_from_Pivot_Table()

Do

Dim i As Variant

For i = 4 To Worksheets("Detail by Line Pivot").Range("B4").Value

    Cells(i, 2).Select
    Selection.Copy
    Cells(i, 2).Offset(1, 1).Select
      
    Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, skipblanks:=False, Transpose:=False
    
Next i

Loop Until IsEmpty(ActiveCell.Offset(0, 1))

End Sub
Thank you!