ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy Cells from One sheet to another without Selecting (https://www.excelbanter.com/excel-programming/367598-copy-cells-one-sheet-another-without-selecting.html)

Matt[_39_]

Copy Cells from One sheet to another without Selecting
 
Here's what I have:
Sheets("Sheet1")
Range("B2").Select
Sheets("Sheet2").Select
Range("A1:D39").Select
Selection.Copy
Sheets("Sheet1").Select
ActiveSheet.Paste

Right now it selects sheet 1, finds cell B2, selects sheet 2, selects
A1:D39, copies, selects sheet 1 again (active cell here is still B2)
and pastes information. Much like one would expect.

I'd like to be able to do this without having to select Sheet2, without
using Selection.Copy or ActiveSheet.Paste. Another situation I need
addressed is to not have to give a range to be selected for the copied
cells.

The information in A1:D39 will be a schedule, but the schedule will be
changed every few months with not necessarily the same number of
entries. The first entry will always be found in A1 and it will span
at least 4 columns but more likely 6.

That's the best description I can think of for what I'm trying to
accomplish, feel free to ask questions though if something seems
unclear.

Thanks


Matt[_39_]

Copy Cells from One sheet to another without Selecting
 
This piece of the code is following an insert of several rows to put
this information in to, is it possible to just insert this information
instead of the blank rows? would that work better? still hoping there
is a solution without using Select or ActiveCell but i'm too new to
this to know.


Matt[_39_]

Copy Cells from One sheet to another without Selecting
 
Is there no solution to this without doing using something similar to
what I have?


Die_Another_Day

Copy Cells from One sheet to another without Selecting
 
How's this:
Sheets("Sheet2").Range("A1").CurrentRegion.Copy Sheets(1).Range("B2")
Note: Blank Rows or columns will cause you problems with this.
HTH

Die_Another_Day
Matt wrote:
Is there no solution to this without doing using something similar to
what I have?




All times are GMT +1. The time now is 03:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com