Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to copy the formula of Cell A1 to A2:A10 by using the following
code, but it always shows the "Object required". Sub copyfor() With Range("A1").copy Range("A2:A10").pastespecial = xlformula End with End Sub Could someone show me the right way to do it. Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Alan,
A good tip in solving issues like this is to record yourself doing it with the macro recorder. Try this:- Sub stantial() Range("A1").Select Selection.AutoFill Destination:=Range("A1:A10") End Sub Mike "AlanW" wrote: I would like to copy the formula of Cell A1 to A2:A10 by using the following code, but it always shows the "Object required". Sub copyfor() With Range("A1").copy Range("A2:A10").pastespecial = xlformula End with End Sub Could someone show me the right way to do it. Thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Range("A1").Copy
Range("A2:A10").PasteSpecial Paste:=xlPasteFormulas Regards Trevor "AlanW" wrote in message ... I would like to copy the formula of Cell A1 to A2:A10 by using the following code, but it always shows the "Object required". Sub copyfor() With Range("A1").copy Range("A2:A10").pastespecial = xlformula End with End Sub Could someone show me the right way to do it. Thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 10 ruj, 09:30, AlanW wrote:
I would like to copy the formula of Cell A1 to A2:A10 by using the following code, but it always shows the "Object required". Sub copyfor() With Range("A1").copy Range("A2:A10").pastespecial = xlformula End with End Sub Could someone show me the right way to do it. Thanks Alan, Range("A2:A10").Formula = Range("A1").Formula Regards Iztok |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy formula result (text) only - without copying formula | Excel Discussion (Misc queries) | |||
I copy a formula and the results copy from the original cell | Excel Discussion (Misc queries) | |||
copy formula down a column and have cell references change within formula | New Users to Excel | |||
Copy/Paste how to avoid the copy of formula cells w/o calc values | Excel Discussion (Misc queries) | |||
Copy formula so destination displays formula as text | Excel Discussion (Misc queries) |