Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Evalute Array Formula in VBA code
Hey
I have this string that is programatically inserted into a cell as an array formula: =1*MID(A2,MATCH(FALSE,ISERROR(1*MID(A2,ROW(INDIREC T("1:"&LEN(A2))),1)), 0),LEN(A2)-SUM(1*ISERROR(1*MID(A2,ROW(INDIRECT("1:"&LEN(A2))) ,1)))) It returns a valid result. I would like to be able to evaluate this formula and get the result in VBA before I insert it into a cell. How do I do this? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Evalute Array Formula in VBA code
MsgBox Activesheet.Evaluate( _
"1*MID(A2,MATCH(FALSE,ISERROR(1*MID(A2,ROW(INDIREC T(" & _ """1:""&LEN(A2))),1)),0),LEN(A2)-SUM(1*ISERROR(1*MID(A2,ROW(" & _ "INDIRECT(""1:""&LEN(A2))),1))))") -- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) wrote in message ps.com... Hey I have this string that is programatically inserted into a cell as an array formula: =1*MID(A2,MATCH(FALSE,ISERROR(1*MID(A2,ROW(INDIREC T("1:"&LEN(A2))),1)), 0),LEN(A2)-SUM(1*ISERROR(1*MID(A2,ROW(INDIRECT("1:"&LEN(A2))) ,1)))) It returns a valid result. I would like to be able to evaluate this formula and get the result in VBA before I insert it into a cell. How do I do this? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Evalute Array Formula in VBA code
That gave me a runtime error 13 Type Mismatch
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
I need to evalute two cells and return a result | Excel Worksheet Functions | |||
evalute error | Excel Programming | |||
Tricky array formula issue - Using array formula on one cell, then autofilling down a range | Excel Programming | |||
How do create a formula to evalute a # to return 1 of 4 conditions | Excel Worksheet Functions | |||
Code for Array formula | Excel Programming |