working on the fallowing code and i keep getting the fallowing error compile error else without if but i have the if in there any ideas
thanks for the help
Code:
Sub converted():
Dim t As Integer
Dim y As Integer
Dim z As Integer
t = Sheets("Data").Range("w1").Value
y = 2
If Sheets("Data").Cells(y, 20).Value = "x" Then
Do While y < t
Sheets("Data").Range("Y,20").EntireRow.Cut _
Sheets("NO ppp").Range("a" & Rows.Count).End(xlUp).Offset(1, 0)
Rows(ActiveCell.Row).deletexlshiftup
Else: y = y + 1
End If
End Sub