Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I've got an Array Formula that I want to be able to convert to a VBA
function so that I can manipulate it without having to copy and paste the formula a large number of times through out the 800 line workbook. The base Formula, which uses Name ranges is: Revenue: =SUM((ytd.ccb=VALUE(BCostCentre))*(ytd.ccc=VALUE($ C19))*(ytd.ccd<VALUE(191))*(ytd.ccd<VALUE(999))* (ytd.act))*-1) Expense: =SUM((ytd.ccb=VALUE(BCostCentre))*(ytd.ccc=VALUE($ C19))*(ytd.ccd<VALUE(191))*(ytd.ccd<VALUE(999))* (ytd.act))) What I want to do is along the lines of....... if the values in ytd.ccb, ytd.ccc and ytd.ccd are null then sum up everything otherwise if there is a value, only do that value. This is one of the formula modifications I've done. =IF(BCostCentre="",SUM((ytd.ccc=VALUE($C19))*(ytd. ccd<VALUE(191))*(ytd.ccd<VALUE(999))*(ytd.act))*-1,SUM((ytd.ccb=VALUE(BCostCentre))*(ytd.ccc=VALUE( $C19))*(ytd.ccd<VALUE(191))*(ytd.ccd<VALUE(999)) *(ytd.act))*-1) but I think it would be a lot easier to do it using a VBA function. Ideally, I would like to use a wildcard string in those values, eg: "***" which will tell the formula to sum all and not filter it based on the results. Any assistance would be appreciated. Thanks. |
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 |