+ Reply to Thread
Results 1 to 4 of 4

Copy a range of cells without switching worksheets.

  1. #1
    Registered User
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    4

    Copy a range of cells without switching worksheets.

    Hi all

    I would like to copy a range of cells from worksheet ("Summer") when active in the worksheet ("Single Article"), without switching worksheets, in order to speed up the process of the macro, and not show the user the data in the background.

    At the moment I currently have the below code:

    when active in "Single Article" sheet -

    Please Login or Register  to view this content.
    The part of the code I would like to change, if possible, is the:

    Please Login or Register  to view this content.
    I want to select the filtered range in "Summer" worksheet, without switching to the "Summer" sheet to do so. The autofilter line of the code filters a table in worksheet "Summer" of which the results I would like to paste into worksheet ("Single Article"). At the moment I have managed to filter the data in the "Summer" sheet, without switching worksheets and I would like to do the same with copying the results.

    Thanks in advance for any help. If you could explain the theory behind any help also, as I would like to understand what I'm doing not just doing it because its right!!


    Dean

    Moderator Note:

    Pls use code tags around your code next time as per forum rules.
    Last edited by Fotis1991; 09-24-2013 at 12:05 PM.

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Copy a range of cells without switching worksheets.

    Try

    Please Login or Register  to view this content.
    Martin

  3. #3
    Registered User
    Join Date
    07-23-2013
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Copy a range of cells without switching worksheets.

    Hi

    Thanks for the help. Unfortunately when I edited my code using your suggested one above, I get a 'Run-time error '1004': Application-defined or object-defined error.'

    When I debug the error it highlights the line below:

    Please Login or Register  to view this content.
    Any thoughts, thanks again.

  4. #4
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Copy a range of cells without switching worksheets.

    Try

    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)

Similar Threads

  1. Copy/Paste Range of Data from Multiple Workbooks/Worksheets to Master Workbook/Worksheets
    By NumberCruncher311 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-19-2013, 08:21 PM
  2. [SOLVED] Copy to this range of cells in multiple worksheets?
    By ThomasCarter in forum Excel General
    Replies: 2
    Last Post: 10-02-2012, 01:56 PM
  3. Copy selected cells from a range of worksheets and paste in master table
    By simba3088 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-20-2012, 07:59 AM
  4. [SOLVED] Copy and paste cells dynamically to a range in a series of named Worksheets.
    By skyping in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-27-2012, 04:22 AM
  5. Problem Switching Between Worksheets
    By Jeff Wenndorf in forum Excel General
    Replies: 2
    Last Post: 03-10-2005, 04:06 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