Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Evalute Array Formula in VBA code

That gave me a runtime error 13 Type Mismatch

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
I need to evalute two cells and return a result dp Excel Worksheet Functions 1 March 11th 09 09:20 PM
evalute error Brian Excel Programming 1 August 31st 07 09:08 AM
Tricky array formula issue - Using array formula on one cell, then autofilling down a range aspenbordr Excel Programming 0 July 27th 05 03:59 PM
How do create a formula to evalute a # to return 1 of 4 conditions Larry Excel Worksheet Functions 4 May 29th 05 12:58 AM
Code for Array formula Annette[_5_] Excel Programming 1 February 22nd 05 02:09 PM


All times are GMT +1. The time now is 08:41 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"