+ Reply to Thread
Results 1 to 12 of 12

transfer a selected range of data on one sheet to another workbook

  1. #1
    Registered User
    Join Date
    08-21-2013
    Location
    texas
    MS-Off Ver
    Excel 2010
    Posts
    5

    transfer a selected range of data on one sheet to another workbook

    Hi, I am new to this trying to learn. My goal is to transfer a selected range of data on one sheet to another workbook as many times as needed, and place the data in succession. i.e. skip a row every time the data is transferred to the other workbook. (It can't be copy/paste) I am trying to send the worksheet titled "end of week" to the workbook titled monthly1.

    I need help finishing my code. I have been watching several videos and reading through different forums but i can't figure it out.

    Please Login or Register  to view this content.
    thank you for the help
    Attached Files Attached Files
    Last edited by Ask Steve; 08-23-2013 at 11:53 AM. Reason: Added CODE tags and corrected title, as per Forum Rules. Take a moment to read the Forum Rules in the menu bar above. Thanks.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: transfer a selected range of data on one sheet to another workbook

    Hi Ask Steve

    Welcome to the Forum!

    So, Ask Steve, I'm going to ask...why not?
    It can't be copy/paste
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Registered User
    Join Date
    08-21-2013
    Location
    texas
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: transfer a selected range of data on one sheet to another workbook

    hello! thank you.

    I guess it can be copy paste inside the macro if that is what you are asking. I just don't want to go to the trouble of copying and pasting the range of data inside the other excel workbook every time the data is updated. Using the record macro button, I came up with something similar to that, however the problem with doing that is, I am not sure how to modify the code to include an if statement to put the data into a cell range other than "A1" every time the macro is executed.

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: transfer a selected range of data on one sheet to another workbook

    Hi Ask Steve

    Well, the recorded Code can be cleaned up to automate the process. Post your recorded Code (be sure to use Code Tags)...one of us will assist.

    To use Code Tags, copy your code and click the # icon at the top of your post window...paste the Code between the
    Please Login or Register  to view this content.
    symbols.

  5. #5
    Registered User
    Join Date
    08-21-2013
    Location
    texas
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: transfer a selected range of data on one sheet to another workbook

    Please Login or Register  to view this content.

    Very simple code as you can see. What I would like for it to further do is this; automatically paste into cell destination "A1:I9", then when the macro is run a second time I would like for it to then skip a row and paste in the exact same fashion except this time into "A11:i19", and continue doing this in a similar fashion every time the macro is run.

    (I hope i put my code in correctly)

  6. #6
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: transfer a selected range of data on one sheet to another workbook

    Hi Steve

    If no one gets back to you tonight I'll get back to you tomorrow...late here.

  7. #7
    Registered User
    Join Date
    08-21-2013
    Location
    texas
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: transfer a selected range of data on one sheet to another workbook

    Alright sounds good.

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: transfer a selected range of data on one sheet to another workbook

    Like so:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  9. #9
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: transfer a selected range of data on one sheet to another workbook

    Hi Ask Steve

    Try this
    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    08-21-2013
    Location
    texas
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: transfer a selected range of data on one sheet to another workbook

    Jaslake the code you provided does exactly what I wanted. I greatly appreciate your time and effort thank you very much.

    JBeaucaire I went through the code you provided and it was similar to what I had in mind, but not exactly. Thank you for your input.

  11. #11
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: transfer a selected range of data on one sheet to another workbook

    You're welcome...glad I could help. Thanks for the Rep.

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: transfer a selected range of data on one sheet to another workbook

    Quote Originally Posted by Ask Steve View Post
    JBeaucaire I went through the code you provided and it was similar to what I had in mind, but not exactly. Thank you for your input.
    No problem.. I see you may have needed to increment the OFFSET() to 2 instead of 1 to get that blank row in between.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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