VBA: Copy column to another workbook based on cell value

JennV

New Member
Joined
May 9, 2019
Messages
34
Hello there,

In workbook1, I have data in column A for 'Name1'.

2019-04-18
2019-04-19 (cell filled in with blue)
2019-04-20 (cell filled in with red)
2019-04-21

In workbook2, I have columns in row 1:

Name1 ...... Name2 ...... Name3

I'm wondering if there's a code that will search for 'Name1' in workbook2 and then copy the data I have in workbook1 underneath 'Name1' in workbook2. In addition, if there is already data underneath 'Name1' to simply override what's there with the new data.

Thank you in advance!
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
The parameters are not clear. Why search for Name1 in workbook2, we know it is the first column? Do you mean search for Name1 in workbook 1 then copy data beneath Name1 from workbook 1 to the Name1 column in workbook 2? If the latter is what you really mean, then can you give a better example of what column A in workbook 1 looks like? Would column A of workbook 1 also have Name2 and Name3 listed with data beneath?
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,897
Messages
6,175,269
Members
452,628
Latest member
dd2

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