[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

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Status
Not open for further replies.

Forum statistics

Threads
1,224,827
Messages
6,181,200
Members
453,022
Latest member
RobertV1609

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