[VBA] Search worksheet for match and copy/paste

Not open for further replies.


New Member
Nov 26, 2018

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
Not open for further replies.

Forum statistics

Latest member

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...