+ Reply to Thread
Results 1 to 8 of 8

copy ranges to new worksheet

  1. #1
    Forum Contributor
    Join Date
    04-21-2010
    Location
    Budapest
    MS-Off Ver
    Excel 2010
    Posts
    155

    copy ranges to new worksheet

    I attached a sample file illustrated in the requirements.
    In Sheet1 there are two range1: A1:K52 and range2 A55:K106
    The macros should copy rows from range1 up to the LastRow from range 1 and from range2 up to the LastRow from range 2.
    The Sheet2 has some text so the copied cell must be start from row 10.
    The result must be seem as you can see in the sample file Sheet2.
    Attached Files Attached Files
    Last edited by ccsmith; 10-14-2010 at 05:35 AM.

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

    Re: copy ranges to new worksheet

    Like so, put this in a code module and connect it to your button:
    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!)

  3. #3
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: copy ranges to new worksheet

    Please, avoid merged cells.

    Please Login or Register  to view this content.



  4. #4
    Forum Contributor
    Join Date
    04-21-2010
    Location
    Budapest
    MS-Off Ver
    Excel 2010
    Posts
    155

    Re: copy ranges to new worksheet

    Thank you. It is working.

  5. #5
    Forum Contributor
    Join Date
    04-21-2010
    Location
    Budapest
    MS-Off Ver
    Excel 2010
    Posts
    155

    Re: copy ranges to new worksheet

    JBeaucaire: Can you modify the VBA to copy only the values (if some cell contains functions I don't need the functions just the values)?

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

    Re: copy ranges to new worksheet

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    04-21-2010
    Location
    Budapest
    MS-Off Ver
    Excel 2010
    Posts
    155

    Re: copy ranges to new worksheet

    Thank you for all answers.

  8. #8
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: copy ranges to new worksheet

    Please Login or Register  to view this content.

+ 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