VBA Copy & Paste Data Between Workbooks

bored622

New Member
Joined
Mar 2, 2022
Messages
43
Office Version
  1. 2016
Platform
  1. Windows
Hello everyone,
I'm trying to copy data from one workbook to the other while not trying to remove the formulas in the row. Also, it looks for the next blank row based on if column A is blank. Below is an example of what I'm trying to accomplish.

Workbook One Sheet 1
Name, blank cell, blank cell, blank cell, blank cell, blank cell, blank cell, blank cell, 100, 100, 100, 100 <<<< This is the row I'm trying to copy over to the other workbook.

Workbook Two Sheet 1
blank cell, formula, formula, formula, formula, formula, formula, formula, blank cell, blank cell, blank cell, blank cell <<<<<<<<<< paste in this row without pasting over the formulas. If i run the module again, it pastes the data to the next row in the same way.

Appreciate any help
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
I figured it out on my own. If anyone is interested in what I was trying to accomplish, this is the code I used.

Sub Transfer()

Workbooks("Data.xlsm").Activate
Sheets("Data").Select
Range("L6:M6").Copy

Workbooks("Test.xlsm").Activate
Sheets("Target").Range("D" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues

Workbooks("Data.xlsm").Activate
Sheets("Data").Select
Range("T6:W6").Copy
Workbooks("Test.xlsm").Activate
Sheets("PTS").Range("L" & Rows.Count).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
Workbooks("Test.xlsm").Save

End Sub
 
Upvote 0
Solution

Forum statistics

Threads
1,214,944
Messages
6,122,391
Members
449,080
Latest member
Armadillos

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