How to loop a Macro to copy and paste data until the end of information in a column.

Norberto813

New Member
Joined
Feb 2, 2022
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Sub Macro4()
'
' Macro4 Macro
'

'
ActiveCell.Select
Selection.Copy
Sheets("dsRNA").Select
ActiveCell.Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.AutoFill Destination:=ActiveCell.Range("A1:A4"), Type:=xlFillCopy
ActiveCell.Range("A1:A4").Select
Sheets("Hamilton Dilution ").Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.Copy
Sheets("dsRNA").Select
ActiveCell.Offset(4, 0).Range("A1").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.AutoFill Destination:=ActiveCell.Range("A1:A4"), Type:=xlFillCopy
ActiveCell.Range("A1:A4").Select
End Sub
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Welcome to the Board!

Posting just your code without a detailed description (or image) of your data isn't all that helpful to us.
I think it would be more beneficial if you posted a sampling of what your data looks like, along with what you would like your expected result to look like.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0

Forum statistics

Threads
1,203,487
Messages
6,055,713
Members
444,810
Latest member
ExcelMuch

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