+ Reply to Thread
Results 1 to 7 of 7

Matching Dates Across Workbooks

  1. #1
    Registered User
    Join Date
    03-11-2014
    Location
    Coventry
    MS-Off Ver
    Excel 2010
    Posts
    24

    Matching Dates Across Workbooks

    Hello,

    This is my first post and I am not too good with VBA, so please bear with me. I've been stuck with this problem for a while and after lots of searching simply cannot find anything on it.

    In short I am trying to create a file that will pull data from another file at regular periods, so I need to paste the data from the update file into the main file. The problem is that the update file does not just contain the new data, it contains all data from the beginning of the year, and the main file contains 10 years of data. So I need to ensure that only the new data is added to the main file (copied and pasted across).

    The way I have been trying to do this is to simply select the first data from the update file (so currently 01/01/2014), find this in the main file and paste the entire contents of the update file from there down (so overwriting the duplicate data).

    I have been looking at the FIND and MATCH functions and they both work until I introduce the variable which finds the date from the update file (I hope that makes sense....)

    Here is an example of something I have tried (I have only tried it within one workbook at the moment for simplicity):


    Please Login or Register  to view this content.
    The copy and paste part is not here as I am stuck at the point of locating the correct cell in the main workbook. I use MsgBox just to see if it has worked.

    If I replace 'RFStart' in the find function with an actual date (or a word) it works. But when attempting to use the RFStart variable I get various errors whatever I try.

    Any help would be great.

    Thanks
    Last edited by jamie1985; 03-19-2014 at 12:13 PM.

  2. #2
    Registered User
    Join Date
    03-11-2014
    Location
    Coventry
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Matching Dates Across Workbooks

    Can anybody help please...?

    I realise I probably haven't specified everything in the correct way but the problem I am having only relates specifically to using the RFStart variable in the Find function. Does anybody know if it's just not possible to do this?

    Thanks

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Matching Dates Across Workbooks

    Welcome to the forum.

    We'd like to help you but first..

    Pls take some minutes to read forum rules and specially-in this case- rule#3 and add code tags around your code.
    Then anyone will be able to help you.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  4. #4
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Matching Dates Across Workbooks

    sorry Fottis, we probably posted the same time.
    Click on the star if you think I helped you

  5. #5
    Registered User
    Join Date
    03-11-2014
    Location
    Coventry
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Matching Dates Across Workbooks

    Sorry, I've added the tags now.

    Thanks

  6. #6
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Matching Dates Across Workbooks

    Before Set rngRFPaste you should make active your worksheet where you try to find RFStart. E.g sheet("name").activate

  7. #7
    Registered User
    Join Date
    03-11-2014
    Location
    Coventry
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Matching Dates Across Workbooks

    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 10
    Last Post: 09-04-2013, 08:34 PM
  2. 2 workbooks and matching data
    By kcwork in forum Excel General
    Replies: 8
    Last Post: 04-11-2012, 02:49 AM
  3. VBA Matching between two workbooks
    By dreamphyre in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-22-2012, 10:21 AM
  4. List Matching with Dates: Using Dates as filters
    By Thawk in forum Excel General
    Replies: 6
    Last Post: 02-15-2009, 05:12 PM
  5. Matching Names in two different workbooks
    By Angela in forum Excel General
    Replies: 2
    Last Post: 12-14-2005, 11:30 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1