Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
E2007 formulas display as formulas, not results | Excel Worksheet Functions | |||
Intermediate value of a set of array. | Excel Worksheet Functions | |||
Using intermediate results in Worksheet functions | Excel Worksheet Functions | |||
Exclude 0 from MIN array results | Excel Discussion (Misc queries) | |||
Array formulas into VB programming | Excel Programming |