View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default 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