Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
We know that for putting an arrya formula we use "Range.formulaArray" property. But what about if I need to use an array formula result in the context of my code (like myVar =workbook.formula) and passing it to my variable, without putting it on a cell: just like MyVar or myFunction = arrayformula(sth). Is there any way? please help. -- Thans & Best regards Leo, InfoSeeker |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
myVar = Activesheet.Evaluate(the_array_formula)
-- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Leo" wrote in message ... Hi, We know that for putting an arrya formula we use "Range.formulaArray" property. But what about if I need to use an array formula result in the context of my code (like myVar =workbook.formula) and passing it to my variable, without putting it on a cell: just like MyVar or myFunction = arrayformula(sth). Is there any way? please help. -- Thans & Best regards Leo, InfoSeeker |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thank you so much for your reply, it did great help!
after a 2 or 3 times of error I managed to run this code with no error; Public Sub MySub() Dim myVar As Long myVar = Application.Evaluate("=SUM(IF((Sheet1!$A$2:$A$2000 =""P07"")*(Sheet1!$H$2:$H$2000=200707),Sheet1!$U$2 :$U$2000,0))") Debug.Print myVar End Sub the point was that it should be used withouth the symbol "{}" -- Thans & Best regards Leo, InfoSeeker "Bob Phillips" wrote: myVar = Activesheet.Evaluate(the_array_formula) -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Leo" wrote in message ... Hi, We know that for putting an arrya formula we use "Range.formulaArray" property. But what about if I need to use an array formula result in the context of my code (like myVar =workbook.formula) and passing it to my variable, without putting it on a cell: just like MyVar or myFunction = arrayformula(sth). Is there any way? please help. -- Thans & Best regards Leo, InfoSeeker |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hide #VALUE! in result of array formula | Excel Worksheet Functions | |||
Passing string as array variable (Pivot VBA) | Excel Discussion (Misc queries) | |||
Passing formula value to variable, hide rows | Excel Programming | |||
keep recursion result (a dynamic array) without using global variable | Excel Programming | |||
Passing SQL Query Result Into A Variable | Excel Programming |