+ Reply to Thread
Results 1 to 6 of 6

Copy a range from one worksheet into another

  1. #1
    Registered User
    Join Date
    04-24-2013
    Location
    Charlotte NC
    MS-Off Ver
    Excel 2007
    Posts
    31

    Copy a range from one worksheet into another

    I am trying to copy a range from one worksheet into another. The range selected to be copied is based on criteria selected.

    Example: if an "x" is placed in any of the following cells (C24,C25,C26,C27,C28) on the operational tab then copy range ("K29:N29") from the Operational tab to ("B28:E28") on the Summary tab

    I have written it as a CASE statement but it keeps failing.



    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copy a range from one worksheet into another

    Maybe:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-24-2013
    Location
    Charlotte NC
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Copy a range from one worksheet into another

    Thank you for your response.

    I wanted to use a case statement becasue I need to be able to repeat this several times meaning if the "x" is in another range a different range will need to be copied.

  4. #4
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copy a range from one worksheet into another

    Maybe:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-24-2013
    Location
    Charlotte NC
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Copy a range from one worksheet into another

    John Thank you it work I am most greatful.

    Can you explain what Intersect does I am not sure I understand.

  6. #6
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Copy a range from one worksheet into another

    You're welcome. Glad to help out. Intersect returns a Range object the represents an intersection of two or more ranges. In this case Target is a Range and Range("C24:C28") is a Range. Therefore when the target cell is within Range("C24:C28") (ie intersect) it sets off the event or the actions you want the macro to perform.

+ 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. VBA Match Cell Range to Worksheet Name and copy/paste to respective worksheet
    By rlsublime in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-24-2014, 04:06 PM
  2. Replies: 3
    Last Post: 09-08-2013, 06:38 PM
  3. [SOLVED] Copy range from the worksheet preceding the active worksheet
    By davidrias in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-31-2013, 10:57 PM
  4. Copy text from set range in one worksheet to named worksheet in another workbook
    By Steven811 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-25-2013, 10:55 AM
  5. [SOLVED] macro error Copy Time format to other Worksheet and continues copy range
    By feroguz in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-25-2012, 01:30 PM

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