Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Would anyone know how to write a vba code that does the following: copies sheet1 (a1:a10) pastes it to sheet2 (a1:a10) copies sheet1 (b1:b10) pastes it to sheet3 (a1:a10) your help is greatly appreciated! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "Henrik" wrote in message ... Hi, Would anyone know how to write a vba code that does the following: copies sheet1 (a1:a10) pastes it to sheet2 (a1:a10) copies sheet1 (b1:b10) pastes it to sheet3 (a1:a10) your help is greatly appreciated! I believe this is what you want /Fredrik Sub MyCopy() Sheets("Sheet1").Select Range("A1:A10").Select Selection.Copy Sheets("Sheet2").Select Range("A1:A10").Select ActiveSheet.Paste Sheets("Sheet1").Select Range("B1:B10").Select Selection.Copy Sheets("Sheet3").Select Range("A1:A10").Select ActiveSheet.Paste End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Or, another way:
Sub test4() Sheets("Sheet1").Range("A1:A10").Copy Sheets("Sheet2").Range("A1:A10") Sheets("Sheet1").Range("B1:B10").Copy Sheets("Sheet3").Range("A1:A10") End Sub Regards Trevor "Fredrik Wahlgren" wrote in message ... "Henrik" wrote in message ... Hi, Would anyone know how to write a vba code that does the following: copies sheet1 (a1:a10) pastes it to sheet2 (a1:a10) copies sheet1 (b1:b10) pastes it to sheet3 (a1:a10) your help is greatly appreciated! I believe this is what you want /Fredrik Sub MyCopy() Sheets("Sheet1").Select Range("A1:A10").Select Selection.Copy Sheets("Sheet2").Select Range("A1:A10").Select ActiveSheet.Paste Sheets("Sheet1").Select Range("B1:B10").Select Selection.Copy Sheets("Sheet3").Select Range("A1:A10").Select ActiveSheet.Paste End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Henrik,
Sub Tester() Sheets("Sheet1").Range("A1:A10").Copy ActiveSheet.Paste Destination:=Sheets("Sheet2").Range("A1") Sheets("Sheet2").Range("B1:B10").Copy ActiveSheet.Paste Destination:=Sheets("Sheet3").Range("A1") Application.CutCopyMode = False End Sub --- Regards, Norman "Henrik" wrote in message ... Hi, Would anyone know how to write a vba code that does the following: copies sheet1 (a1:a10) pastes it to sheet2 (a1:a10) copies sheet1 (b1:b10) pastes it to sheet3 (a1:a10) your help is greatly appreciated! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't Copy and Paste or Paste Special between Excel Workbooks | Excel Discussion (Misc queries) | |||
Copy; Paste; Paste Special are disabled | Excel Discussion (Misc queries) | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) | |||
I cannot paste from one workbook to another. Copy works, paste do. | Excel Discussion (Misc queries) | |||
Macro to Copy/Paste then Paste to Next Line | Excel Programming |