+ Reply to Thread
Results 1 to 5 of 5

Marco to pull data from workbook by searching for date

  1. #1
    Forum Contributor
    Join Date
    09-09-2008
    Location
    Middlesbrough, England
    MS-Off Ver
    2007
    Posts
    174

    Marco to pull data from workbook by searching for date

    Hi,

    I am looking to create a macro which will pull data from an excel spreadsheet which name will change depending upon date.

    Eg. Today the workbook is called "071011 Health" and i would like to copy from A2 to A1000 and paste into a worksheet named with todays date in DDMM format "0710" into cells A2 to A1000.

    The issue i think will be the constant changing of file name.

    Any help greatly appreciated.

    Regards

    Chris

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Marco to pull data from workbook by searching for date

    You can include a command to ask the user to open the required file. Once the file is opened, you can have the macro search for the sheet containing today's date and then do the copy paste.

    Does this work for you?

  3. #3
    Forum Contributor
    Join Date
    09-09-2008
    Location
    Middlesbrough, England
    MS-Off Ver
    2007
    Posts
    174

    Re: Marco to pull data from workbook by searching for date

    Hi,

    If option A isnt available always willing to listen to option B :D

  4. #4
    Forum Contributor
    Join Date
    09-09-2008
    Location
    Middlesbrough, England
    MS-Off Ver
    2007
    Posts
    174

    Re: Marco to pull data from workbook by searching for date

    Can anyone one help with arlu's suggestion?

  5. #5
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,238

    Re: Marco to pull data from workbook by searching for date

    Hi Batchy, will the workbook always be stored in the same location, just a change in filename?

    And how is the date calculated in the filename you are looking for? Is it the last working day?
    Last edited by Kyle123; 10-10-2011 at 04:54 AM.

+ 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