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: 25
Default array formulas in vba help

I have a workbook with a range of array formulas or CSE formulas. They are
essentially averageif formulas. They are available in 2007 but this has to be
saved in xls format. So, I have done a CSE or Array formula with the
ctrl+shift+enter. My problem is copying and pasting my formulas into other
workbooks with vba and them keeping that format. Here is the part of my code
where I try to alleviate that problem.


Here is my array formula that comes from
basebook.Worksheets("NetWeatherResidualLookup").Ra nge("B2:B3433").Formula:

"=AVERAGE(IF('Cnty Effect'!$A$2:$A$10000=NetWeatherResidualLookup!A2, 'Cnty
Effect'!$C$2:$C$10000,""))"




Here is the code:

Set myrange = mybook.Worksheets("NetWeatherResidualLookup").Rang e_("B2:B3433")
averageifformula =
basebook.Worksheet_("NetWeatherResidualLookup").Ra nge("B2:B3433").Formula
myrange.FormulaArray = averageifformula

Application.DisplayAlerts = False

mybook.Close ([True])


Basically it is copying the formulas from the basebook and pasting them into
mybook. The mybook is all of the workbooks in a folder. Can someone help me
with this? Right now it takes forever to paste the range and when I do, my
relative reference in the equation is even. Instead of it referencing cell
A1, A2 and A3, it is A2, A4 and A6. Any help would be greatly 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
Convert Array Formulas to Regular Formulas Domenick Excel Worksheet Functions 6 August 17th 15 09:16 PM
Convert Array Formulas to Regular Formulas minyeh Excel Worksheet Functions 0 March 21st 10 05:55 AM
Formulas with-an an array Dave Excel Worksheet Functions 2 December 12th 07 03:24 PM
when to use array formulas Dave F[_2_] Excel Discussion (Misc queries) 2 July 5th 07 02:14 PM
Array Formulas jin Excel Worksheet Functions 9 May 2nd 07 06:42 PM


All times are GMT +1. The time now is 08:53 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"