Results 1 to 4 of 4

Copy a range of cells without switching worksheets.

Threaded View

  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 -

    If (Sheets("Summer").Range("G3").Value) = "2" Then
        Sheets("Summer").Range("$A$4:$H$6000").AutoFilter Field:=7, Criteria1:="<>"
        Sheets("Summer").Select
        Range("A5:B5").Select
        Range(Selection, Selection.End(xlDown)).Select
        Selection.Copy
        Sheets("SINGLE ARTICLE").Select
        Range("Z98").Select
        ActiveSheet.Paste
    The part of the code I would like to change, if possible, is the:

     Sheets("Summer").Select
        Range("A5:B5").Select
        Range(Selection, Selection.End(xlDown)).Select
        Selection.Copy
    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.

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. [SOLVED] 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