[VBA] Search worksheet for match and copy/paste

Status
Not open for further replies.

lababa

New Member
Joined
Nov 26, 2018
Messages
7
Hi,

I have two excel documents, "Book1" and "Book2". Book1 is exported from our business system. Book2 is a compilation of forecast from the businesssystem data that were exported.

Today I have to manually put in the data from Book1 to Book2. I want to put a VBA Code in Book2 to import data from Book1 and automate that process.

In Book2 I have dates in row 25 like dec-18, jan-19, feb-19 and so on. I want these dates to be matched with the dates in Book1 that are displayed as 2019-01-05 and so on, which are displayed vertically in column S. I want the row 25 in Book2 to go to Book1 and match the dates, and if it gets a match I want it to put the data from Book1 column R associated with that date in same row, in the column associated with that date on Book2. Could someone help me do this ?
For example Book2matches jan-19 with 2019-01-05 and imports 6.414.992 to row 30 in Book2.

Book1: https://framapic.org/EdCfiEnwNE3G/xi0yGTaWM33i.PNG
Book2: https://framapic.org/3RciFks0qJBE/s3t48R3Ncna9.PNG
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Status
Not open for further replies.

Forum statistics

Threads
1,223,893
Messages
6,175,244
Members
452,622
Latest member
Laura_PinksBTHFT

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