Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can't copy the whole bar chart with Block Arrows over the last cou | Charts and Charting in Excel | |||
How to copy large block of cells but paste into one column | Excel Worksheet Functions | |||
How do you block the copy window to right of screen | Excel Discussion (Misc queries) | |||
copy a block of cells | Excel Discussion (Misc queries) | |||
How to copy block of cells and keep grouping? | Excel Discussion (Misc queries) |