LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Easy copy of an Array Formula with Dynamic Value...

Hello -- I am sorry, this is a re-post on a question posed earlier. The
solution given worked in part. I have an array formula - {with the
shift+ctrl+enter}:

{=INDEX('Sheet2'!$A$8:$AI$13219,MATCH($G6205&"",'s heet2'!$A$8:$A$13219&'sheet2'!$B$8:$B$13219,0),30) }

There are four columns with the same formula except a different number - 27,
29, and 34.

I would like to copy the formula throughout my spreadsheet (+10K rows). The
fill takes a long time and hangs.

Sharad Naik provided the following code...

Sub OrTryThis()
Dim i As Integer, strFormula As String
For i = 2 To 9
With Sheet1
.Range(.Cells(4, i), .Cells(6, i)).Formula = _
.Cells(2, i).Formula
strFormula = .Cells(6, i).Formula
.Range(.Cells(4, i), .Cells(6, i)).Formula = strFormula
End With
Next i
End Sub

This does not work with arrays... He suggested modifying it to the
following...

Sub ThenTryThis()
Dim i As Integer, strFormula As String
For i = 2 To 9
With Sheet1
.Range(.Cells(4, i), .Cells(6, i)).FormulaArray = _
.Cells(2, i).FormulaArray
strFormula = .Cells(6, i).FormulaArray
.Range(.Cells(4, i), .Cells(11789, i)).FormulaArray = strFormula
End With
Next i
End Sub

This just copy the value in the initial cell throughout losing the dynamic
cell reference.

Borrowed code found in the group to change a formula to an array formula but
it is also taking time.

Cells(r,c).FormulaArray = Cells(r,c).Formula

Help...

I am sorry for being so long winded...

Thanks
Dennis G.

Any and all help would be appreciated.

 
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
Prob an easy one: How do i copy a formula EXACTLY as it is ant1983 Excel Worksheet Functions 9 November 27th 09 05:59 AM
Easy eay to copy / paste a formula in column watermt Excel Worksheet Functions 2 November 17th 09 03:22 PM
Dynamic Sum Array Formula Input Help excelCPA Excel Discussion (Misc queries) 3 September 25th 09 06:40 PM
How to read offset cells from dynamic sort array formula? Jay Weiss Excel Discussion (Misc queries) 1 September 20th 07 07:11 PM
array formula with a dynamic range. Dave Excel Worksheet Functions 2 June 26th 06 06:16 AM


All times are GMT +1. The time now is 12:03 PM.

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"