Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enter array formula results

Status
Not open for further replies.

sogc

Technical User
Jun 8, 2004
34
CA
I am using an array formula to find a value, but I want to enter the resulting value of the array and not the array formula itself.

Right now I am using ActiveCell.FormulaArray = "array formula...". But what I really want is to enter the value of that array formula.
 



Hi,

Rather than speaking in hypotheticals, why not just post the code that you are actually using, and explain what is happening.

Skip,
[sub]
[glasses] When a wee mystic is on the loose..
It's a Small Medium at Large! [tongue][/sub]
 

Here is the code I am currently using to enter an array formula into the activecell in a worksheet.
Code:
ActiveCell.FormulaArray = "=INDEX(GamesList,SMALL(IF(GamesList=SelectedSessionIndex,ROW(GamesList)-ROW(GamesListFirstPosition),ROW(GamesListLastPosition)),5),9)"

What I would like to do is evaluate this formula and enter the results of the array formula in the active cell.
 



Code:
With ActiveCell.FormulaArray = "=INDEX(GamesList,SMALL(IF(GamesList=SelectedSessionIndex,ROW(GamesList)-ROW(GamesListFirstPosition),ROW(GamesListLastPosition)),5),9)"
   .Copy
   .PasteSpecial xlpastevalues
End With

Skip,
[sub]
[glasses] When a wee mystic is on the loose..
It's a Small Medium at Large! [tongue][/sub]
 




...check that precious statement...
Code:
With ActiveCell
   .FormulaArray = "=INDEX(GamesList,SMALL(IF(GamesList=SelectedSessionIndex,ROW(GamesList)-ROW(GamesListFirstPosition),ROW(GamesListLastPosition)),5),9)"
   .Copy
   .PasteSpecial xlpastevalues
End With

Skip,
[sub]
[glasses] When a wee mystic is on the loose..
It's a Small Medium at Large! [tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top