Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub CommandButton1_Click()
- Dim recSheet As Worksheet
- Set recSheet = ThisWorkbook.Sheets("original")
- 'loop through column A and find words
- 'which starts with "Acc" if next cell is not starting with "Acc"
- 'LastRow = recSheet.Cells(Rows.Count, "A").End(xlUp).Row
- 'NextRow = recSheet.Cells(Rows.Count, "A").End(xlUp).Row + 1
- 'For i = 2 To LastRow
- 'If Range("A" & i).Value = "Acc*" And NextRow <> "Acc*" Then
- ' Range("A" & i).Select
- 'Selection.Cut
- 'Range("B" & i").Select
- 'ActiveSheet.Paste
- 'End If
- 'Next i
- End Sub
Add Comment
Please, Sign In to add comment