LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Convert array formula into VBA module

Maybe...
dim res as variant
dim myFormula as string

myformula = "IF(BCostCentre="""",SUM((ytd.ccc=VALUE($C19)) " _
& "*(ytd.ccd=VALUE(rep.fund))*(ytd.act))," _
& "SUM((ytd.ccb=VALUE(BCostCentre))*(ytd.ccc=VALUE($ C19))", _
& "*(ytd.ccd=VALUE(rep.fund))*(ytd.act)))"

res = worksheets("somesheetnamehere").evaluate(myformula )

(Untested.)

If that doesn't work, share that snippet of code.

Forgone wrote:

On Oct 31, 9:22 pm, Dave Peterson wrote:
Does this mean that the Evaluate function worked?


I tried it, and it doesn't appear to be working at all.
This is the entire function that works.

{=IF(BCostCentre="",SUM((ytd.ccc=VALUE($C19))*(ytd .ccd=VALUE(rep.fund))*(ytd.act)),SUM((ytd.ccb=VALU E(BCostCentre))*(ytd.ccc=VALUE($C19))*(ytd.ccd=VAL UE(rep.fund))*(ytd.act)))}


--

Dave Peterson
 
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
complex excel formula Array how do I convert it to a vba Function Rob Excel Worksheet Functions 1 April 10th 06 07:06 PM
Array contents in module page? lance Excel Programming 1 October 14th 05 10:53 PM
Convert Normal formula to array formula Pradip Jain Excel Programming 4 May 23rd 05 04:32 PM
Convert Chart Series Formula to Array Via VBA? Kevin G[_2_] Excel Programming 1 May 6th 04 05:13 AM
variant array containing cel adresses convert to actual ranges-array Peter[_21_] Excel Programming 5 December 10th 03 09:50 PM


All times are GMT +1. The time now is 06:02 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"