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.
Bookmarks