VBA code to copy contents from "Workbook A tab" into "Workbook B tab" using a MACRO.

Emeister

New Member
Joined
Jan 15, 2025
Messages
0
Office Version
  1. 365
Platform
  1. Windows
I have a report I run on a daily basis. I normally label the report by the date it was processed to keep track of the day the report was run. I then save it to my computer. The data in the new, downloaded workbook will change on a daily basis, so this method works best for me. For this example, I have two workbooks I labeled "Workbook A" and "Workbook B." In column A in each workbook (On their respective tabs; Tab A for example), I have certain numbers reported from my Power BI. These numbers will eventually drop off after so many days, but I need to be able to copy the contents from columns B, C and D (Respective of the value in column A) so I do not have to manually copy from workbook A to workbook B. In addition, the numbers in columns A may be inside the tab but may not necessarily be in the same row each time so a compare feature will need to be executed so the MACRO can identify the correct value in column A and the contents from columns B, C and D are copied to the correct row in the other workbook.

Also, if a code can be setup for a window to appear asking the user to identify the workbook names to copy from and to copy to would be great. I will not be using the workbook A and B names going forward. I will be using dates for the names of each workbook, so the workbook names will be different on a daily basis. This is why a window asking what the names of the workbooks are so the code can reference the correct workbooks.
 
You have posted this in the "Test Here" forum. This is just a place to test your posting skills and various posting toold. If this is a real question you would like answered, please post it to the "Excel Questions" forum.
 

Forum statistics

Threads
1,225,613
Messages
6,186,003
Members
453,334
Latest member
Prakash Jha

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