+ Reply to Thread
Results 1 to 5 of 5

Macro to Copy Data from a Sheet and Save it as a different Sheet with a Specified File Nam

  1. #1
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Bengaluru
    MS-Off Ver
    Excel 2013
    Posts
    108

    Macro to Copy Data from a Sheet and Save it as a different Sheet with a Specified File Nam

    Hi all,

    Hi all, I'm facing a problem and need some help to sort it out. Here is the problem.

    I'm using an Excel Sheet from which I need to export the data on a Monthly Basis at the end of every month. This file will be saved as Month_Year (ex: Sep 2013, Nov 2013 e.t.c). I want to get the Month and Year get updated automatically. So I'm Using NOW() function of Excel in 2 cells one for Month and the other for Year. But when I'm trying to run the macro its giving an error, the data is being exported but the file is not being saved in the specific file format. I'm posting the code and Sample workbook for getting a clear understanding of the problem.

    Please help me in sorting it out.. Thanks in Advance..

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Macro to Copy Data from a Sheet and Save it as a different Sheet with a Specified File

    Since you are using current date for the filename, just change to this:
    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Bengaluru
    MS-Off Ver
    Excel 2013
    Posts
    108

    Re: Macro to Copy Data from a Sheet and Save it as a different Sheet with a Specified File

    Thank u very much Millz..
    It worked..

    Can u plz let me know if it is possible to save the file in a specific location in the same format..

  4. #4
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Macro to Copy Data from a Sheet and Save it as a different Sheet with a Specified File

    Yes, you just have to specify the directory before the filename.
    E.g.
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    12-19-2012
    Location
    Bengaluru
    MS-Off Ver
    Excel 2013
    Posts
    108

    Re: Macro to Copy Data from a Sheet and Save it as a different Sheet with a Specified File

    Hi Millz,

    Thank u for the reply...

    Rep Added

+ 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. [SOLVED] macro to save sheet with specific file name from sheet
    By mezza89 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-05-2013, 12:04 PM
  2. [SOLVED] Copy Data and paste it in new sheet and save new sheet as value of cell a2
    By VKS in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-03-2013, 08:55 AM
  3. [SOLVED] VBA Help need for pullout data to new sheet from Master Sheet & save as new file (UserForm
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 33
    Last Post: 01-19-2013, 06:01 PM
  4. Copy Sheet into New Workbook then Save File As Macro
    By larzep in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-23-2011, 02:57 AM
  5. Macro to save data in sheet to file on hard drive.
    By sandbach in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-26-2010, 03:55 PM

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