+ Reply to Thread
Results 1 to 3 of 3

Copy Data to Sheets (Sheet name based on value from Cell)

  1. #1
    Forum Contributor
    Join Date
    11-02-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    353

    Copy Data to Sheets (Sheet name based on value from Cell)

    Hi all,
    I have a macro which is working okay but I would like to make a minor change.
    The macro is copying a range from a different excel sheet and it pastes the values on a sheet called "2017"
    Here is the code:

    Please Login or Register  to view this content.

    What I was hoping to do is that instead of pasting the value to Sheet "2017", I'd like the macro to paste it in a sheet based on a particular Cell value.
    For example:

    On another sheet named "Process" at Cell A1 my value is 2018.
    I would like the macro to paste the data to a sheet called 2018.

    I hope you could take a quick look and appreciate any help. Thank you.
    Last edited by Andrew.Trevayne; 02-10-2017 at 09:18 AM.

  2. #2
    Forum Contributor frabulator's Avatar
    Join Date
    09-16-2015
    Location
    United States
    MS-Off Ver
    2019
    Posts
    101

    Re: Copy Data to Sheets (Sheet name based on value from Cell)

    This has not been tested, but you should be able to refrence that cell by modifying the following line:

    Please Login or Register  to view this content.

    ---EDIT---

    Please note that the above modification uses a string variable that will gather the name listed on sheet "Process" in the cell "A1". If the that cell contains a name that is not currently a sheet, or the sheet "Process" does not exist then your program will error out.

  3. #3
    Forum Contributor
    Join Date
    11-02-2010
    Location
    Philippines
    MS-Off Ver
    Excel 2003
    Posts
    353

    Re: Copy Data to Sheets (Sheet name based on value from Cell)

    Thanks so much for you help! It worked great!

+ 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: 0
    Last Post: 09-16-2015, 01:18 PM
  2. [SOLVED] VBA Code to copy different data from one sheet to multiple sheets based on criteria
    By eharwood in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-08-2014, 02:22 PM
  3. Copy data from one sheet to another sheets in the same excel based on date
    By shansakhi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-30-2014, 11:02 PM
  4. [SOLVED] To copy rows from one sheet to other sheets based on the first part of the named cell
    By JamesJohnson31 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-30-2014, 12:38 AM
  5. [SOLVED] Copy from different sheets- data based on selection and paste rows in new sheet
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-17-2014, 03:30 AM
  6. Replies: 2
    Last Post: 07-13-2012, 08:12 PM
  7. Copy rows from one sheet to different sheets based on cell value
    By Ireland316 in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 04-26-2012, 06:17 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