Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I was very happy when I found that I could simplify my code when copy and
pasting to one line as follows Range("Current_Prices").Copy Destination:=Range However I would like to paste the value. Is this possible in one line or do we have to make do with Application.Goto Reference:="Current_Prices" Selection.Copy Application.Goto Reference:="Previous_Prices" Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False Thanks in advance for your assistance |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 6 ruj, 13:00, Richard wrote:
I was very happy when I found that I could simplify my code when copy and pasting to one line as follows Range("Current_Prices").Copy Destination:=Range However I would like to paste the value. Is this possible in one line or do we have to make do with Application.Goto Reference:="Current_Prices" Selection.Copy Application.Goto Reference:="Previous_Prices" Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False Thanks in advance for your assistance try with this "Worksheets("NameOfSheet").Range("C3").Copy Destination:=Worksheets("NameOfSheet").Range("C10" )" |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think I might not have been very clear.
My problem is that I can easily copy and paste using 1 line of code. What I am copying is a formula and I would like to simplify the code for copying and pasting the VALUE, not the formula itself. "I.R;))" wrote: On 6 ruj, 13:00, Richard wrote: I was very happy when I found that I could simplify my code when copy and pasting to one line as follows Range("Current_Prices").Copy Destination:=Range However I would like to paste the value. Is this possible in one line or do we have to make do with Application.Goto Reference:="Current_Prices" Selection.Copy Application.Goto Reference:="Previous_Prices" Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False Thanks in advance for your assistance try with this "Worksheets("NameOfSheet").Range("C3").Copy Destination:=Worksheets("NameOfSheet").Range("C10" )" |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
OK, Iknow have this down to 2 lines
Range("C8").Copy Range("E10").PasteSpecial xlPasteValues Is there any way to improve on this? "I.R;))" wrote: On 6 ruj, 13:00, Richard wrote: I was very happy when I found that I could simplify my code when copy and pasting to one line as follows Range("Current_Prices").Copy Destination:=Range However I would like to paste the value. Is this possible in one line or do we have to make do with Application.Goto Reference:="Current_Prices" Selection.Copy Application.Goto Reference:="Previous_Prices" Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False Thanks in advance for your assistance try with this "Worksheets("NameOfSheet").Range("C3").Copy Destination:=Worksheets("NameOfSheet").Range("C10" )" |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 7 ruj, 11:50, Richard wrote:
OK, Iknow have this down to 2 lines Range("C8").Copy Range("E10").PasteSpecial xlPasteValues Is there any way to improve on this? Yes! Range("C8").Copy: Range("E10").PasteSpecial xlPasteValues |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Personally, I wouldn't use this. Under most circumstances, I find this harder
to read. "I.R;))" wrote: On 7 ruj, 11:50, Richard wrote: OK, Iknow have this down to 2 lines Range("C8").Copy Range("E10").PasteSpecial xlPasteValues Is there any way to improve on this? Yes! Range("C8").Copy: Range("E10").PasteSpecial xlPasteValues -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not really an improvement, but another alternative:
with activesheet .range("E10").value = .range("C8").value end with Richard wrote: OK, Iknow have this down to 2 lines Range("C8").Copy Range("E10").PasteSpecial xlPasteValues Is there any way to improve on this? "I.R;))" wrote: On 6 ruj, 13:00, Richard wrote: I was very happy when I found that I could simplify my code when copy and pasting to one line as follows Range("Current_Prices").Copy Destination:=Range However I would like to paste the value. Is this possible in one line or do we have to make do with Application.Goto Reference:="Current_Prices" Selection.Copy Application.Goto Reference:="Previous_Prices" Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False Thanks in advance for your assistance try with this "Worksheets("NameOfSheet").Range("C3").Copy Destination:=Worksheets("NameOfSheet").Range("C10" )" -- Dave Peterson |
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 without file name referenced after paste | Excel Discussion (Misc queries) | |||
help w/ generic copy & paste/paste special routine | Excel Programming | |||
Excel cut/Paste Problem: Year changes after data is copy and paste | Excel Discussion (Misc queries) | |||
Copy and Paste macro needs to paste to a changing cell reference | Excel Programming |