Data transfer from one workbook to another

drop05

Board Regular
Joined
Mar 23, 2021
Messages
113
Office Version
  1. 365
Platform
  1. Windows
Any help would be greatful!
Looking for a way using python or VBA to basically transfer data from workbook one to workbook two. The yellow cells and the light grey cells are the areas where data will be put into. I know it may show two rows, but the user is able to have multiple. As you can see there are some descriptions that are the same like name address etc, one workbook has more than the other.

So im trying to get it to basically have the user select which two workbooks to be the sources one to get from the other to paste into with similar landing spots. With that it is only from one sheet in each workbook. Then get the data from wrkbook1 to workbook 2 and everything to the right of it since the can have multiple names, address, etc, which can be 1 to 100 to 1000 cells to the right/.. Any ideas or ways to do so? There is more areas below but something to get started. Thank you!

Workbook 1
1suit.PNG

workbook 2
xlm.PNG
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

goesr

Well-known Member
Joined
Nov 15, 2013
Messages
678
Hello drop05. I just tried this for another post and it may help you get started. Try the following code which copies from Test1.xlsx to Test2.xlsx. Hope this helps and good luck!
VBA Code:
Sub CopyPaste_Test()
'Note: Assuming both Test1.xlsx and Test2.xlsx are open workbooks
    Windows("Test1.xlsx").Activate
    Sheets("contacts").Select
    Range("C5:D14").Select
    Selection.Copy
    Windows("Test2.xlsx").Activate
    Sheets("register").Select
    Range("C5").Select
    ActiveSheet.Paste
End Sub
 

Forum statistics

Threads
1,148,244
Messages
5,745,596
Members
423,964
Latest member
Rayds

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
Top