Cut and Paste Macro?!?!

SDave

Board Regular
Joined
Aug 12, 2008
Messages
152
Office Version
  1. 365
Platform
  1. MacOS
Would anyone happen to know of or have a cut and paste macro?!

Within my current workbook, I have 4 tabs. I would like data to be cut and transferred from the Data tab to the Leavers tab when column M (within the Data tab) is populated with the word "Yes", subsequently shifting the data up one whilst keeping the said range mentioned below.

Column M's range is M11:M5001
The row range within the Data tab is C11:M5001
The row range within the Leavers tab is C11:M5001

Any help would be much appreciated.

I have searched high and low and I can't seem to find what it is I am after.
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Try this: right click the Data sheet's tab, select View Code and paste in

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 13 Then
    If LCase(Target.Value) = "yes" Then
        Application.EnableEvents = False
        Range("C" & Target.Row).Resize(, 10).Copy Destination:=Sheets("Leavers").Range("C" & Rows.Count).End(xlUp).Offset(1)
        Target.EntireRow.Delete
        Application.EnableEvents = True
    End If
End If
End Sub
Then press ALT + Q to return to the sheet.
 
Upvote 0
Thanks VoG - much appreciated. It worked a charm!!!
 
Upvote 0

Forum statistics

Threads
1,215,425
Messages
6,124,824
Members
449,190
Latest member
rscraig11

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top