PasteSpecial macro
Good evening,
Need some help to clean up the recorded macro below. Sheet1 is the ActiveSheet. Trying to paste the values of Range("A1:A10") to Sheet2. Cant find out the right syntax. Thankful for any hints. Brgds CG Rosén --------------------------------------------------------------------- Sheets("Sheet1").Select Range("A1:A10").Select Selection.Copy Sheets("Sheet2").Select Range("A1").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False |
PasteSpecial macro
Sheets("Sheet1").Range("A1:A10").Copy
Sheets("Sheet2").Range("A1").PasteSpecial _ Paste:=xlPasteValues, _ Operation:=xlNone, _ SkipBlanks:=False, _ Transpose:=False Doesn't make any difference which sheet is the activesheet. Sheets("Sheet2").Range("A1:A10").Value = _ Sheets("Sheet1).Range("A1:A10").Value is another way to do it. -- Regards, Tom Ogilvy CG Rosén wrote in message ... Good evening, Need some help to clean up the recorded macro below. Sheet1 is the ActiveSheet. Trying to paste the values of Range("A1:A10") to Sheet2. Cant find out the right syntax. Thankful for any hints. Brgds CG Rosén --------------------------------------------------------------------- Sheets("Sheet1").Select Range("A1:A10").Select Selection.Copy Sheets("Sheet2").Select Range("A1").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False |
PasteSpecial macro
CG
You do not have to copy the data, this will perform the same action Sub pasteValues() Sheets("Sheet2").Range("A1:A10").Value = _ Sheets("Sheet1").Range("A1:A10") End Sub Regards Peter -----Original Message----- Good evening, Need some help to clean up the recorded macro below. Sheet1 is the ActiveSheet. Trying to paste the values of Range("A1:A10") to Sheet2. Cant find out the right syntax. Thankful for any hints. Brgds CG Rosén ---------------------------------------------------------- ----------- Sheets("Sheet1").Select Range("A1:A10").Select Selection.Copy Sheets("Sheet2").Select Range("A1").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False . |
All times are GMT +1. The time now is 04:43 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com