LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Evaluate an Array Formula before inserting it in a cell

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 when inserted as an array into a cell. But
I would like to be able to evaluate this
formula and get the result in VBA before I insert it into a cell.


Bob Phillips posted the following yesterday but its resulting in
runtime error 13 Type Mismatch:
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))))")



Thanks
Todd

 
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
Inserting Formula into Array [email protected] Excel Discussion (Misc queries) 17 July 2nd 07 06:14 PM
How to use/evaluate another Cell Formula in R1C1 style Caio Milani[_2_] Excel Programming 2 November 7th 06 04:11 PM
Macro to evaluate a cell and replace one part of the formula John[_114_] Excel Programming 2 January 19th 06 07:31 PM
I Need a formula to evaluate a cell with + or - values Bob in Oklahoma Excel Worksheet Functions 6 October 31st 05 02:41 PM
Array formula returning #N/A when inserting new rows. [email protected] Excel Programming 2 October 15th 05 10:17 AM


All times are GMT +1. The time now is 04:19 PM.

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

About Us

"It's about Microsoft Excel"