Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Block Copy as opposed to EditCopy

In QPW, in macros, most of the time if I didn't want to
take the cursor to a range and do a macro command to edit
copy, then manipulate the cursor back to the new range,
and then do an edit paste. So, I was able to do a macro
equivalent of the menu "block copy" through a macro that
basically allowed me to name a range in the block copy
range without going there, and have it pasted into the
active cell or cells.

Example, I'm in a macro and my cursor is in cell A15. I
know that I want to copy the values of range A100 through
S100 (which we will call a range named "Type2header").

I don't want to move my cursor. I want it to stay in the
active cell which is A15 for the sake of discussion, and I
want to paste the values in the range "Type2header" to
A15..S15. I want an exact overlay basically.

Can I do this in Excel?
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default Block Copy as opposed to EditCopy

Hi Bruce,

Me again...

You will find that Select is not needed (most of the time).
Just about any code with Select can be simplified by just doing it straight.
This also makes the code run faster.

Range("A100:S100").Copy _
Destination:=Range("A15")

should do the trick. Notice that only the first cell in the destination
range needs to be identified (this helps when you are not sure but
destination range to specify). And you can use variables and/or named
ranges.

Try something like this:
Range("A3:E3").Formula="=A1+A2"

Or play with formatting, font size, etc.
Remember before you set the print area without selecting the range.

Keep up the good work!

steve

"Bruce Roberson" wrote in message
...
In QPW, in macros, most of the time if I didn't want to
take the cursor to a range and do a macro command to edit
copy, then manipulate the cursor back to the new range,
and then do an edit paste. So, I was able to do a macro
equivalent of the menu "block copy" through a macro that
basically allowed me to name a range in the block copy
range without going there, and have it pasted into the
active cell or cells.

Example, I'm in a macro and my cursor is in cell A15. I
know that I want to copy the values of range A100 through
S100 (which we will call a range named "Type2header").

I don't want to move my cursor. I want it to stay in the
active cell which is A15 for the sake of discussion, and I
want to paste the values in the range "Type2header" to
A15..S15. I want an exact overlay basically.

Can I do this in Excel?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't copy the whole bar chart with Block Arrows over the last cou Jon Charts and Charting in Excel 0 May 7th 09 07:53 PM
How to copy large block of cells but paste into one column Craig Excel Worksheet Functions 3 August 15th 08 04:28 PM
How do you block the copy window to right of screen Todd F. Excel Discussion (Misc queries) 2 June 20th 06 04:30 PM
copy a block of cells florin Excel Discussion (Misc queries) 2 October 12th 05 03:16 PM
How to copy block of cells and keep grouping? dstock Excel Discussion (Misc queries) 2 July 6th 05 08:42 PM


All times are GMT +1. The time now is 01:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"