+ Reply to Thread
Results 1 to 3 of 3

correct syntax to assign a range from one worksheet to another worksheet?

  1. #1
    Forum Contributor
    Join Date
    03-15-2016
    Location
    Vancouver, Canada
    MS-Off Ver
    w 10, Excel 2016
    Posts
    125

    correct syntax to assign a range from one worksheet to another worksheet?

    What's the correct syntax to assign a range from one worksheet to another worksheet?
    i.e. I'm trying to have a New worksheet from A1:Z10 contain the rows from Another worksheet from A20:Z30

    I tried this - but I'm missing something

    Set Newsheet = AnotherSheet.Range("A20:Z30")

    Thanks
    Last edited by Andrew Entee; 03-20-2016 at 08:14 PM.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: correct syntax to assign a range from one worksheet to another worksheet?

    There are multiple ways to do this. Here is one (assuming sheets are named Sheet1 (output) and Sheet2 (source)):

    Please Login or Register  to view this content.
    If you are happy with my response please click the * in the lower left of my post.

  3. #3
    Forum Contributor
    Join Date
    03-15-2016
    Location
    Vancouver, Canada
    MS-Off Ver
    w 10, Excel 2016
    Posts
    125

    Re: correct syntax to assign a range from one worksheet to another worksheet?

    Awesome - thanks

+ 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. Store range of cells in another worksheet and assign ID to row
    By cajand in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-21-2014, 07:33 AM
  2. Correct Syntax for Named Worksheet
    By biocentrism in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-10-2014, 11:45 AM
  3. [SOLVED] Correct syntax for referencing a separate worksheet in a formula when.
    By moosetales in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-20-2014, 03:01 PM
  4. Assign named range in worksheet to combo box
    By AppSupportKarl in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2011, 06:38 AM
  5. How to assign an imported XML worksheet range to a VBA variable?
    By tonybreyal in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-11-2009, 02:34 PM
  6. [SOLVED] Correct syntax for Active Worksheet
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-03-2005, 04:05 PM
  7. Assign Range - Inactive Worksheet
    By jazzjava in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-15-2005, 09:05 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