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: 3
Default Programming Array Formulas in VBA - Can they be intermediate results in RAM?

I'd like to be able to set a cell value, using the results of an array
formula as an intermediate step. For example, Column 1 of my data is a
timestamp. Column 5 is series of numbers. I want to place, on sheet 2,
the maximum value of column 5, and the date/time that it occurred.

I've actually got many columns to perform this on, and each column has
a named range that covers the column just from row 2 to the last row
with data. In the example below, I'm interested in the range
InBytesCur

The following from John Walkenbach's 2003 formula book suggests this
array formula for finding the row of the max
=MIN(IF(InBytesCur=MAX(InBytesCur),ROW(InBytesCur) , ""))

1) If I use this code to get the row of the max:
Dim TC As Range
Set TC = Range("Sheet2!a2")
TC.FormulaArray =
"=MIN(IF(InBytesCur=MAX(InBytesCur),ROW(InBytesCur ), ""))"

I get the error that it can't set the FormulaArray property on the
range object. I'm getting that error a lot, trying to learn to program
array formulas into my worksheets via macros. I've discovered the
messages in this group that explain VBA won't accept an FormulaArray
string of more than 256 chars, but that doesn't explain why the above
example won't run.

But in the larger picture, I'd prefer to figure out how to use the
Array Formula directly, without having to place it's results in a
cell. Can an Array Formula operate in memory, without having to place
it's results in a cell? If so, I can find the date/time value I need
using RC offset on the data sheet (Row X, Column 1, where X comes from
the Array Formula).

Thanks in advance for any pointers!
 
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
E2007 formulas display as formulas, not results Pierre Excel Worksheet Functions 3 January 14th 10 04:59 PM
Intermediate value of a set of array. HARSHAWARDHAN. S .SHASTRI[_2_] Excel Worksheet Functions 5 September 25th 08 09:01 PM
Using intermediate results in Worksheet functions [email protected] Excel Worksheet Functions 6 February 6th 08 02:59 AM
Exclude 0 from MIN array results Craig Excel Discussion (Misc queries) 2 January 11th 07 05:26 PM
Array formulas into VB programming Angelo Battistoni Excel Programming 3 August 28th 03 05:34 PM


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