Solved Moving Rows from One Sheet to another using VBA

September 4, 2012 at 04:06:17
Specs: Windows XP
Thank you to every one that helped in my previous post. I did not get the exact answer to my queries but it helped massively.

Now i have manage the get half of the asnwer to my queries by joggling through the various replies from your expertise.

Here is what i came up with:

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
If Target.Column = 5 Then
If Target = "Y" Then
'If yes, Store Row number, Determine next empty Row in
delRow = Target.Row
nxtRow = Sheets("Removed List").Range("A" & Rows.Count).End(xlUp).Row + 1
Target.EntireRow.Cut Destination:=Sheets("Removed List").Range("A" & nxtRow)
Rows(delRow).EntireRow.Delete shift:=xlUp

End If
End If
Application.EnableEvents = True
End Sub

Now, i am trying to use more than one selection instead of only one which, is the Y:

I would like to use "Y" or "W" to move the row. But currently, when i select Y the row is moved to the destination sheet but i tried all i could think of but my second selection is not working. Your help will be much appreciated.

Best regards

See More: Moving Rows from One Sheet to another using VBA

September 4, 2012 at 05:31:44
✔ Best Answer
First, a posting tip:

Please click on the blue line at the end of this post and read the instructions found via that link. It will explain the proper way to post VBA code in this forum.

As for your question, try this:

If Target = "Y" Or Target = "W" Then

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •
Related Solutions

Ask Question