VBA Cut Paste Range in Excel Explained with Examples

We can use VBA to Cut a Range to another Paste into Clipboard or other location or range. Range.Cut method will cut and it will save the data in the Clipboard then you can select any range and paste. You can also specify the destination range while cutting a range.



50+ Project Management Templates Pack
Excel PowerPoint Word

Advanced Project Plan & Portfolio Template
Excel Template

Business Presentations Templates Pack
PowerPoint Slides

20+ Excel Project Management Pack
Excel Templates

20+ PowerPoint Project Management Pack
PowerPoint Templates

10+ MS Word Project Management Pack
Word Templates

VBA Cut Method Excel Range Object

VBA to Cut Range in Excel – Syntax

Here is the syntax to cut a range using VBA. Here, Destination is the range which you want to be copied. This is optional, if you are not providing the destination range, this will copy to the Clipboard.



VBA to Cut Range in Excel – Examples

Here is the simple example to cut and copy a paste. In this example, we cut the data at Range “A2:D10” and copy to the Clipboard and then Pasting in the Range “E2”.

Sub Cut_Range_To_Clipboard()
Range("A2:D10").Cut 'This will cut the source range and copy the Range "A2:D10" data into Clipboard
'Now you can select any range and paste there
End Sub

VBA to Cut and paste the Range to Destination in Excel – Example

Here is the another example to cut and copy a range to specific range and directly paste into another location of the worksheet. In this example, we cut the range “A2:D10” and pasting at Range “E2”.

Sub Cut_Range_To_Destination_Range()
Range("A2:D10").Copy Range("E2")
'Or you can write as Range("A2:D10").Cut Destination:=Range("E2")
End Sub

VBA to Cut Range in Excel – Execution Instructions

You can follow the below steps to execute the macro to cut and paste a range using VBA.

  1. Open an Excel Workbook from your start menu or type Excel in your run command
  2. Enter some data in any cells in range “A2:D10″ to test this macro.
  3. Press Alt+F11 to Open VBA Editor or you can go to Developer Tab from Excel Ribbon and click on the Visual Basic Command to launch the VBA Editor
  4. Insert a Module from Insert Menu of VBA
  5. Copy the above code (to cut a range using VBA) and Paste in the code window(VBA Editor)
  6. Save the file as Macro Enabled Workbook (i.e; .xlsm file format)
  7. Press ‘F5′ to run it or Keep Pressing ‘F8′ to debug the code line by line.

Now you can observe that the Range A2:D10 is cleared and pasted in the specific range. This will cut the range including its formats and other elements in that particular range.


One Comment

  1. lena raberger December 5, 2015 at 12:51 PM - Reply

    when I try to copy and paste a row from one worksheet to another the whole sequence works (including selecting the right destination range, at the end of the list, but activesheet.paste only seems to paste my row to the top row of the destination sheet’ writing over data that is already there
    I have rewritten it a million times with different output, sigh

    lastrowc = Selection.CurrentRegion.Rows.Count + 1
    Range(lastrowc, 1).Select
    what do I do wring?


Leave A Comment

Related pages

select a range vbahow to erase duplicates in excelexcel consolidate data from multiple sheetspivot table refresh vbaenable macro vbahow to unprotect sheet in excel 2010 without passwordexcel vba rowsmacro templates for excelmacro in excel exampleiferror function excel 2010vba coding tutorialcomplex macros in excelpivot table advanceexcel trim formulapivot tables examplesvlookup functionhow to count columns in excelcoding calculatorexcel removing duplicatesexcel lookup and reference functionsnested if then excelexcel macro range selecthow to remove duplicates in excel 2010convert from excel to xmlaverageif excel 2013excel iferrornested if in vbscriptexcel mysql connectionvba array excelhow to unprotect the excel sheetvba nullhow to change the width of a cell in excelhow to merge the cells in excelrun query in access vbavba worksheet cellssort excel vbawhat is a vlookup function in excellistbox userform vbavba coding examplesunprotect excel 2010 workbookhow to add developer tab in exceldelete file excel vbaexcel adotask planner templateexcel vba collectionexcel shortcuts insert rowaccess vba recordsetaccess vba message boxexcel vba nameshow to add columns in excel 2007chart preparation in excelmeeting agenda template powerpointhyperlink in vbaexcel colour indexdefine macros in excelschedule template for excelchar function excelvba byvalwrite if statement in excellen in excelvbcrlf vbahow to make drop down list in excel 2007how to unhide column a in excel 2013excel vba programexcel 2010 identify duplicatesunhide column a excel 2010merging worksheets in excelvba word tablesexcel formula based on cell coloradvanced filter excel unique recordstimeline spreadsheet template excel