+ Reply to Thread
Results 1 to 3 of 3

VBA to update excel dbase based on data in columns with latest dates in another workbook.

  1. #1
    Registered User
    Join Date
    04-05-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    88

    VBA to update excel dbase based on data in columns with latest dates in another workbook.

    Hi everyone,

    I have a simple excel database that grows everyday. Ive gotten a macro form this forum that helps me copy columns based on headers which are dates.

    The Issue is that want to create a macro that copies columns of the latest dates from another workbook; we shall call it "sourcedata" into my current database without manually entering the dates.

    So suppose in my current excel database I have columns dated 23 may, 24 may and 25 may, the new macro will automatically find the column with the latest date header in the "sourcedata" workbook and copy the whole column and paste into the next empty column after the 25th may column in my current DB.

    Please help out.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,079

    Re: VBA to update excel dbase based on data in columns with latest dates in another workbo

    Would you care to provide a sample workbook with some typical data to work with?

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    04-05-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007
    Posts
    88

    Re: VBA to update excel dbase based on data in columns with latest dates in another workbo

    Okay,

    I attached sample of the currentdb and sourcedata.

    currentdb.xlsx

    samplesourcedata.xlsx

    The thing I need is a dynamic macro to check for all dates in the header of each column in "sourcedata", and to copy only the ones not already in the "currentdb", then columnd is then pasted right next to the last column in "currentdb".

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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