Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
when you use the .copy method, is there any way to only copy formulas? or
do you have to use the paste method to achieve this? this copies formats, too Worksheets("Sheet1").Range("A1:D4").Copy _ destination:=Worksheets("Sheet2").Range("E5") -- Gary |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
sorry, this should be values, not formulas
when you use the .copy method, is there any way to only copy values? or do you have to use the paste method to achieve this? -- Gary "Gary Keramidas" wrote in message ... when you use the .copy method, is there any way to only copy formulas? or do you have to use the paste method to achieve this? this copies formats, too Worksheets("Sheet1").Range("A1:D4").Copy _ destination:=Worksheets("Sheet2").Range("E5") -- Gary |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Gary,
Gary Keramidas wrote: sorry, this should be values, not formulas when you use the .copy method, is there any way to only copy values? or do you have to use the paste method to achieve this? You could do a copy then paste special values. Or, you could just do something like this: Range("B1:B10").Value = Range("A1:A10").Value -- Regards, Jake Marx www.longhead.com [please keep replies in the newsgroup - email address unmonitored] |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This copies only the cells with formulas... Not sure if that is what you
want... Sub CopyFormulas() Dim rng As Range On Error Resume Next Set rng = Sheet1.Range("A:A").SpecialCells(xlCellTypeFormula s) On Error GoTo 0 If rng Is Nothing Then MsgBox "nothing was found" Else rng.Copy End If End Sub -- HTH... Jim Thomlinson "Gary Keramidas" wrote: when you use the .copy method, is there any way to only copy formulas? or do you have to use the paste method to achieve this? this copies formats, too Worksheets("Sheet1").Range("A1:D4").Copy _ destination:=Worksheets("Sheet2").Range("E5") -- Gary |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here it is for constants...
Sub CopyFormulas() Dim rng As Range On Error Resume Next Set rng = Sheet1.Range("A:A").SpecialCells(xlCellTypeConstan ts) On Error GoTo 0 If rng Is Nothing Then MsgBox "nothing was found" Else rng.Copy End If End Sub -- HTH... Jim Thomlinson "Jim Thomlinson" wrote: This copies only the cells with formulas... Not sure if that is what you want... Sub CopyFormulas() Dim rng As Range On Error Resume Next Set rng = Sheet1.Range("A:A").SpecialCells(xlCellTypeFormula s) On Error GoTo 0 If rng Is Nothing Then MsgBox "nothing was found" Else rng.Copy End If End Sub -- HTH... Jim Thomlinson "Gary Keramidas" wrote: when you use the .copy method, is there any way to only copy formulas? or do you have to use the paste method to achieve this? this copies formats, too Worksheets("Sheet1").Range("A1:D4").Copy _ destination:=Worksheets("Sheet2").Range("E5") -- Gary |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is this helpful:
Worksheets("Sheet1").Range("A1:D4").Select Selection.Cells.SpecialCells(xlCellTypeFormulas).C opy Destination:=Worksheets("Sheet1").Range("E5") "Gary Keramidas" wrote: when you use the .copy method, is there any way to only copy formulas? or do you have to use the paste method to achieve this? this copies formats, too Worksheets("Sheet1").Range("A1:D4").Copy _ destination:=Worksheets("Sheet2").Range("E5") -- Gary |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Sheet1.Select Range("A1:d4").Copy Sheet2.Select Range("e5").PasteSpecial Paste:=xlPasteFormulas should do the trick -- bill k ------------------------------------------------------------------------ bill k's Profile: http://www.excelforum.com/member.php...nfo&userid=821 View this thread: http://www.excelforum.com/showthread...hreadid=474398 |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ok, thanks everyone for the replies. i have it now
-- Gary "Gary Keramidas" wrote in message ... when you use the .copy method, is there any way to only copy formulas? or do you have to use the paste method to achieve this? this copies formats, too Worksheets("Sheet1").Range("A1:D4").Copy _ destination:=Worksheets("Sheet2").Range("E5") -- Gary |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Another 'Copy To The Next Available Row' Question | Excel Discussion (Misc queries) | |||
copy down question | Excel Worksheet Functions | |||
Copy/Paste Question | Excel Discussion (Misc queries) | |||
Copy Formula Question | Excel Discussion (Misc queries) | |||
copy-move question | Excel Discussion (Misc queries) |