+ Reply to Thread
Results 1 to 3 of 3

Macro to Export data into another worksheet

  1. #1
    Registered User
    Join Date
    09-13-2016
    Location
    Reston, VA
    MS-Off Ver
    2013
    Posts
    17

    Macro to Export data into another worksheet

    I am looking to create a macro that enables me to first create a sheet based on a template and import data from the current sheet (Sheet A) into the newly created sheet (Sheet B) and import data from multiple data ranges. I have attached 2 photos: the first shows what would be considered the active sheet (Sheet A) with colored ranges (Section 1,2,and 3) and the second photo displays the created sheet (Sheet B) (which is created from a template sheet) with the same colored ranges where I'd like the information pasted from the original active sheet (Sheet A).

    I know that this is possible but I'm not sure about how to do this. I am particularly confused about how you would write the macro so that it will pull data from each section in Sheet A and stop when it reaches a blank, then move on to the next section until the new sheet (Sheet B) has collected all the data from the original active sheet.

    See the attached photos for reference.
    Please help!

    Capture 1.PNG
    Capture 2.PNG

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Macro to Export data into another worksheet

    Hi and welcome to the forum

    Pictures are of little value. Honestly, no one wants to re-type your data to try and solve your issue. Additionally, we would only be guessing at how your data was structured, ie. formulas, formatting, etc.

    Please attach a sample file that represents what you have. The structure of your attachment should be the same structure as your actual data. Any proprietary information should be changed.

    Include in the attachment any code you're currently using (whether it works or not) and an "After" of what you wish the output to be.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    09-13-2016
    Location
    Reston, VA
    MS-Off Ver
    2013
    Posts
    17

    Re: Macro to Export data into another worksheet

    Hello,

    Sorry for the mis-use of the forum. I am new to this. I have attached a sample file of what I am trying to do as well as the current code I am using. This code is very basic as it simply copies a set number of cells from the first sheet to the newly created sheet. What I would like to have is a smarter macro that uses named ranges to fill the new sheet with the appropriate information, assuming that the cell destinations may change.

    Current code I am using:

    Please Login or Register  to view this content.
    Hope I did this correctly. Thanks for the reply.

    Moderator Comment: I have added code tags for you. Please take the time to read all the forum rules and abide by them in the future.
    Attached Files Attached Files
    Last edited by alansidman; 10-12-2016 at 06:19 PM. Reason: Code tags 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. Replies: 1
    Last Post: 07-22-2016, 04:38 PM
  2. Edit Macro to export filtered data into separate worksheet instead of PDF
    By tkowon in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-07-2014, 11:23 AM
  3. Macro - Export worksheet to new workbook and unprotect
    By adamheon in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-08-2013, 09:03 AM
  4. Macro to export specific range of data to text file for each worksheet
    By sonofamonkey10 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-30-2013, 05:43 PM
  5. I would need a macro to export data from base example workbook to export worbook
    By slato8 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-01-2012, 11:21 AM
  6. [SOLVED] Macro to export a worksheet and save as new file
    By Mike_M in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-25-2005, 05:50 AM
  7. [SOLVED] Simple macro needed to export a worksheet
    By RobG in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-12-2005, 05:12 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