Hi all,

I am trying to write some code that takes a value from the column and inserts a row above the first instance of that value, and copies the value to the first column in the new row.

It then proceeds to look in the same column until it finds a different string and then does the same as above (inserts a row and moves value to the first cell in the new row.

It works fine for the first 2 different strings and then goes haywire (or should I say my code does)

Here is the code...(pls don't laugh)

I would appreciate any help / advice (i need this working soon)

Sub Tidy
X = 0
Range("D3").Select

ActiveCell.Offset(X, 0).EntireRow.Insert
ActiveCell.Offset(X + 1, 0).Copy
ActiveCell.Offset(X, -3).PasteSpecial


Do Until ActiveCell.Offset(X, 0).Value <> ActiveCell.Value
Range("D4").Select
X = X + 1
Loop
GoTo Row

Row:

ActiveCell.Offset(X, 0).EntireRow.Insert
ActiveCell.Offset((X + 1), 0).Copy
ActiveCell.Offset(X, -3).PasteSpecial

again: If ActiveCell.Offset(0, 1).Value <> ActiveCell.Offset(1, 0) Then
GoTo Row1
End If

End Sub


Regards,

Rocks