Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to write code to paste the contents of a range of cells on sheet
1 to a range of cells on sheet 2 but all it is pasting is a #REF error. I assume this is becuase it is pasting the formula in the cells on sheet 1 and not the values only. Is their a pasteSpecial method to paste teh values of the cells only? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here's the line to add once you have selected where you want to paste.
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False "GLHEC-BLS" wrote: I am trying to write code to paste the contents of a range of cells on sheet 1 to a range of cells on sheet 2 but all it is pasting is a #REF error. I assume this is becuase it is pasting the formula in the cells on sheet 1 and not the values only. Is their a pasteSpecial method to paste teh values of the cells only? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub Macro1()
Range("A1:D7").Select Application.CutCopyMode = False Selection.Copy Sheets("Sheet2").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False End Sub right from the recorder -- Gary''s Student - gsnu200813 "GLHEC-BLS" wrote: I am trying to write code to paste the contents of a range of cells on sheet 1 to a range of cells on sheet 2 but all it is pasting is a #REF error. I assume this is becuase it is pasting the formula in the cells on sheet 1 and not the values only. Is their a pasteSpecial method to paste teh values of the cells only? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change paste to only paste values | Excel Programming | |||
find values in multiple cells and paste row values | Excel Discussion (Misc queries) | |||
can you change the default paste method? (paste values) | Excel Discussion (Misc queries) | |||
Dynamic Copy/Paste Special Formulas/Paste Special Values | Excel Programming | |||
How do i compare values from two sheet and copy & paste if values match? | Excel Programming |