Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
complex excel formula Array how do I convert it to a vba Function | Excel Worksheet Functions | |||
Array contents in module page? | Excel Programming | |||
Convert Normal formula to array formula | Excel Programming | |||
Convert Chart Series Formula to Array Via VBA? | Excel Programming | |||
variant array containing cel adresses convert to actual ranges-array | Excel Programming |