Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Len Len is offline
external usenet poster
 
Posts: 162
Default Copy FormulaArray

Hi,

I've a problem on copying Formula Array from cell O2 to cell O14 or the
rest of cells in column O by using the code1 belows ( ie formula array
is not copied rather copy formula only) :-

Dim rng11 As Range
Set rng11 = Range(Cells(2, 6), Cells(2, 6).End(xlDown))
rng11.Offset(0, 9).Formula = Cells(2, 15).Formula

However, there is no problem if I use the code2 "Selection.AutoFill
Destination:=Range("O2:O14")to copy the formula array but only limit to
cell O14 only, particularly if there have more data to copy in the rest
of cells in column O. Thus, code1 will be able to handle this situation
if it can take formula array

Can anyone help me to solve the above problem ?

Thanks in advance

Regards
Len

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Copy FormulaArray

If you want an Array Formula then say "FormulaArray" in your code.

Dim rng11 As Range
Set rng11 = Range(Cells(2, 6), Cells(2, 6).End(xlDown))
rng11.Offset(0, 9).FormulaArray = Cells(2, 15).FormulaArray

Mike F

"Len" wrote in message
ups.com...
Hi,

I've a problem on copying Formula Array from cell O2 to cell O14 or the
rest of cells in column O by using the code1 belows ( ie formula array
is not copied rather copy formula only) :-

Dim rng11 As Range
Set rng11 = Range(Cells(2, 6), Cells(2, 6).End(xlDown))
rng11.Offset(0, 9).Formula = Cells(2, 15).Formula

However, there is no problem if I use the code2 "Selection.AutoFill
Destination:=Range("O2:O14")to copy the formula array but only limit to
cell O14 only, particularly if there have more data to copy in the rest
of cells in column O. Thus, code1 will be able to handle this situation
if it can take formula array

Can anyone help me to solve the above problem ?

Thanks in advance

Regards
Len



  #3   Report Post  
Posted to microsoft.public.excel.programming
Len Len is offline
external usenet poster
 
Posts: 162
Default Copy FormulaArray

Hi Mike,

Thanks for your reply.

Sorry, I've already tried but it didn't work
regards
Len

Mike Fogleman wrote:
If you want an Array Formula then say "FormulaArray" in your code.

Dim rng11 As Range
Set rng11 = Range(Cells(2, 6), Cells(2, 6).End(xlDown))
rng11.Offset(0, 9).FormulaArray = Cells(2, 15).FormulaArray

Mike F

"Len" wrote in message
ups.com...
Hi,

I've a problem on copying Formula Array from cell O2 to cell O14 or

the
rest of cells in column O by using the code1 belows ( ie formula

array
is not copied rather copy formula only) :-

Dim rng11 As Range
Set rng11 = Range(Cells(2, 6), Cells(2, 6).End(xlDown))
rng11.Offset(0, 9).Formula = Cells(2, 15).Formula

However, there is no problem if I use the code2 "Selection.AutoFill
Destination:=Range("O2:O14")to copy the formula array but only

limit to
cell O14 only, particularly if there have more data to copy in the

rest
of cells in column O. Thus, code1 will be able to handle this

situation
if it can take formula array

Can anyone help me to solve the above problem ?

Thanks in advance

Regards
Len


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Copy FormulaArray

It worked for me. I tested it on a clean sheet and copied the array formula
down column O as far as there was data in column G.
"Len" wrote in message
oups.com...
Hi Mike,

Thanks for your reply.

Sorry, I've already tried but it didn't work
regards
Len

Mike Fogleman wrote:
If you want an Array Formula then say "FormulaArray" in your code.

Dim rng11 As Range
Set rng11 = Range(Cells(2, 6), Cells(2, 6).End(xlDown))
rng11.Offset(0, 9).FormulaArray = Cells(2, 15).FormulaArray

Mike F

"Len" wrote in message
ups.com...
Hi,

I've a problem on copying Formula Array from cell O2 to cell O14 or

the
rest of cells in column O by using the code1 belows ( ie formula

array
is not copied rather copy formula only) :-

Dim rng11 As Range
Set rng11 = Range(Cells(2, 6), Cells(2, 6).End(xlDown))
rng11.Offset(0, 9).Formula = Cells(2, 15).Formula

However, there is no problem if I use the code2 "Selection.AutoFill
Destination:=Range("O2:O14")to copy the formula array but only

limit to
cell O14 only, particularly if there have more data to copy in the

rest
of cells in column O. Thus, code1 will be able to handle this

situation
if it can take formula array

Can anyone help me to solve the above problem ?

Thanks in advance

Regards
Len




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Copy FormulaArray

I meant down column F, not G. When you say "It didn't work", What exactly is
"It" that doesn't work? The only thing I can imagine is that the formula is
copied down as exact copies, meaning any cell references would also be exact
copies, ignoring relative references.
"Mike Fogleman" wrote in message
...
It worked for me. I tested it on a clean sheet and copied the array
formula down column O as far as there was data in column G.
"Len" wrote in message
oups.com...
Hi Mike,

Thanks for your reply.

Sorry, I've already tried but it didn't work
regards
Len

Mike Fogleman wrote:
If you want an Array Formula then say "FormulaArray" in your code.

Dim rng11 As Range
Set rng11 = Range(Cells(2, 6), Cells(2, 6).End(xlDown))
rng11.Offset(0, 9).FormulaArray = Cells(2, 15).FormulaArray

Mike F

"Len" wrote in message
ups.com...
Hi,

I've a problem on copying Formula Array from cell O2 to cell O14 or

the
rest of cells in column O by using the code1 belows ( ie formula

array
is not copied rather copy formula only) :-

Dim rng11 As Range
Set rng11 = Range(Cells(2, 6), Cells(2, 6).End(xlDown))
rng11.Offset(0, 9).Formula = Cells(2, 15).Formula

However, there is no problem if I use the code2 "Selection.AutoFill
Destination:=Range("O2:O14")to copy the formula array but only

limit to
cell O14 only, particularly if there have more data to copy in the

rest
of cells in column O. Thus, code1 will be able to handle this

situation
if it can take formula array

Can anyone help me to solve the above problem ?

Thanks in advance

Regards
Len








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Copy FormulaArray

If you want the formula copied down with relative references, as in
"FillDown", then use this type of code....

Range("O2", Range("F2").End(xlDown)).Offset(0, 9).FillDown




"Mike Fogleman" wrote in message
...
I meant down column F, not G. When you say "It didn't work", What exactly
is "It" that doesn't work? The only thing I can imagine is that the formula
is copied down as exact copies, meaning any cell references would also be
exact copies, ignoring relative references.
"Mike Fogleman" wrote in message
...
It worked for me. I tested it on a clean sheet and copied the array
formula down column O as far as there was data in column G.
"Len" wrote in message
oups.com...
Hi Mike,

Thanks for your reply.

Sorry, I've already tried but it didn't work
regards
Len

Mike Fogleman wrote:
If you want an Array Formula then say "FormulaArray" in your code.

Dim rng11 As Range
Set rng11 = Range(Cells(2, 6), Cells(2, 6).End(xlDown))
rng11.Offset(0, 9).FormulaArray = Cells(2, 15).FormulaArray

Mike F

"Len" wrote in message
ups.com...
Hi,

I've a problem on copying Formula Array from cell O2 to cell O14 or
the
rest of cells in column O by using the code1 belows ( ie formula
array
is not copied rather copy formula only) :-

Dim rng11 As Range
Set rng11 = Range(Cells(2, 6), Cells(2, 6).End(xlDown))
rng11.Offset(0, 9).Formula = Cells(2, 15).Formula

However, there is no problem if I use the code2 "Selection.AutoFill
Destination:=Range("O2:O14")to copy the formula array but only
limit to
cell O14 only, particularly if there have more data to copy in the
rest
of cells in column O. Thus, code1 will be able to handle this
situation
if it can take formula array

Can anyone help me to solve the above problem ?

Thanks in advance

Regards
Len








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re : Excel FormulaArray Copy-and-Paste via VBA [email protected] Excel Discussion (Misc queries) 0 May 5th 08 09:26 AM
FormulaArray Troy Excel Worksheet Functions 1 November 23rd 04 03:42 PM
FormulaArray and Ranges Question akondra[_2_] Excel Programming 0 October 9th 04 04:09 PM
FormulaArray..... HELP !!! Pierre[_6_] Excel Programming 4 May 5th 04 09:37 PM
FormulaArray UK[_2_] Excel Programming 2 February 23rd 04 05:39 PM


All times are GMT +1. The time now is 11:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"