Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub Sortorlo_xy()
- Dim Lr As Long
- Dim i As Long
- Lr = Range("A" & Rows.Count).End(xlUp).Row
- For i = 1 To Lr
- If Range("A" & i).Value = "xy" Then
- If i = 1 Then Exit Sub
- Range("A1:A" & i - 1).EntireRow.Delete
- MsgBox "Az első " & i - 1 & " sor törölve."
- Exit Sub
- End If
- Next i
- MsgBox "Nincs olyan cella az A oszlopban, aminek értéke ""xy""."
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment