Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
cut&paste
Hi!
How can I cut and paste a range of cells into another place? I'm trying with: Sub HidePersonal() Range("Q35:Q40").Select Selection.Copy Selection.Clear End Sub Sub UnhidePersonal() Range("Q35:Q40").Paste End Sub But this doesn't work (error 438). How can this be done? Thanks! -- Daniel |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
cut&paste
hi, Try:
Range("Q35:Q40").Copy Range("R35") This will copy q35:q40 to r35. -----Original Message----- Hi! How can I cut and paste a range of cells into another place? I'm trying with: Sub HidePersonal() Range("Q35:Q40").Select Selection.Copy Selection.Clear End Sub Sub UnhidePersonal() Range("Q35:Q40").Paste End Sub But this doesn't work (error 438). How can this be done? Thanks! -- Daniel . |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
cut&paste
Daniel
Sample code......adjust to suit. Note you don't need to use .Select Public Sub cut_clear() Worksheets("Sheet2").Range("Q35:Q40").Cut _ Destination:=ActiveSheet.Range("K43") End Sub Gord Dibben Excel MVP On Mon, 13 Sep 2004 09:24:08 +0200, Daniel Lidström wrote: Hi! How can I cut and paste a range of cells into another place? I'm trying with: Sub HidePersonal() Range("Q35:Q40").Select Selection.Copy Selection.Clear End Sub Sub UnhidePersonal() Range("Q35:Q40").Paste End Sub But this doesn't work (error 438). How can this be done? Thanks! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
cut&paste
On Mon, 13 Sep 2004 09:06:08 -0700, Gord Dibben wrote:
Daniel Sample code......adjust to suit. Note you don't need to use .Select Public Sub cut_clear() Worksheets("Sheet2").Range("Q35:Q40").Cut _ Destination:=ActiveSheet.Range("K43") End Sub Well, the problem is that I have to have two separate routines, and do the cut in one of them and the paste in the other. Can your sample be modified in this way? -- Daniel |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
cut&paste
Daniel
One way....... Sub cut_it() Range("Q35:Q40").Cut End Sub Sub paste_it() Sheets("Sheet3").Activate With ActiveSheet ..Paste Destination:=Range("M4") End With End Sub Gord On Tue, 14 Sep 2004 09:10:09 +0200, Daniel Lidström wrote: On Mon, 13 Sep 2004 09:06:08 -0700, Gord Dibben wrote: Daniel Sample code......adjust to suit. Note you don't need to use .Select Public Sub cut_clear() Worksheets("Sheet2").Range("Q35:Q40").Cut _ Destination:=ActiveSheet.Range("K43") End Sub Well, the problem is that I have to have two separate routines, and do the cut in one of them and the paste in the other. Can your sample be modified in this way? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Paste and Paste Special No Longer Working - Excel 2003 | Excel Discussion (Misc queries) | |||
In Excel: add a Paste-Special Option to paste IN REVERSE ORDER. | Excel Worksheet Functions | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) | |||
Paste Link enters a 0 into the cell where I paste. How do I elemin | Excel Discussion (Misc queries) | |||
Macro to Paste to specific line, and continue to Paste each time on next row not over | Excel Programming |