VBA: Cut, Copy, Paste from a Macro
It’s pretty easy to cut and paste from a macro. Here are a few examples. The code works identical for copy, just replace the word cut with copy!
This one cuts and pastes a single cell, a1 over to b1:
Sub OneCell()
Range("A1").Select
Selection.Cut
Range("B1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub
This one cuts and pastes an entire column, A over to B:
Sub OneColumn()
Range("A:A").Select
Selection.Cut
Range("B:B").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub
This one cuts and pastes an entire row, 1 over to 2:
Sub OneRow()
Range("1:1").Select
Selection.Cut
Range("2:2").Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Sub


How do you paste it into specific cells in another worksheet?
From VBA help:
Worksheets(“Sheet1″).Range(“A1:D4″).Copy _
Destination:=Worksheets(“Sheet2″).Range(“E5″)
Now I understand
Simply Excellent Code
Hi,
Could you please help-me in this situation…
How to make this function work?
I just need to call it in a cell like “=test_copy(B1)” to see it copied into B2
I am new to vba, but I’m able to do some perl,c++
regards,
Marcelo
Public Function test_copy(Var01 As Range)
Var01.Select
Selection.Copy
Range(“B2″).Select
ActiveSheet.Paste
Application.CutCopyMode = False
End Function
Is there a way to cut a row/rows and insert it/them into a sorted order on a different page with other information? I can’t just insert them at the bottom and sort because the rows on the other page are merged and cannot be sorted. This is the last piece to my VBA puzzle. Thank you!
how do you copy a column from one workbook and paste it in another?
How do you copy Range A7:C11 from the first sheet to all sheets of the workbook (also to A7:C11 on every sheet)? Thanks!
Hi, when complex vba routines run in the background of excel, it becomes impossible to use copy and pate in other applications. Any workaround for this? Cheers, Jeff
How do I copy the cell no. and paste it another cell. Suppose I want the cell no. of the word “Significant” in the worksheet. Assuming it is in B4. How do I paste it in C1 using macro? The macro should be able to find the cell no.
Hi
I have data in 50 worksheets in a workbook (in same format). Can I copy all data and paste it in a New Worksheet, so that a Master File can be created.
I have four rows of data that need to be pastes into another worksheet in 1 column? How do I do this?
I have been trying to set cells equal by value, but for some reason, they can’t transpose automatically.
I have also tried the if then statements so that if the data is greater than zero, then the cell automatically paste into the other sheet, but that wont work either? Any ideas as to how to get multiple rows paste into one column across sheets?
Hi,
I need to do a find of a certain word in my worksheet, then cur the entire row it is in and insert that into the first row. Which is easy enough.. but the row the particular word is in changes each time… How can i make it cut a different row each time the Macro is run?
Is there a way, using an input form, to tell the macro where to start pasting information? For example:
The typical command is: Range(“B2″).Select
I want to be able to tell the macro a different cell to copy to starting somewhere other than “B2″. Maybe B3 or B4.