Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am passing a range, along with some other parameters, to a UDF that
calculates a safety stock requirement. Based on the other parameters I send to the UDF, the UDF needs to return the sum of a certain number of sequential elements in the range. For example, if the range contains (2, 2, 2, 3, 3, 3, 4, 4, 4), and I need 4 weeks of safety stock, the UDF should sum 2 + 2 + 2 + 3. Would there be a way to sum with a single command the first four values the above range? Currently I am looping through the range and adding the "next" value on each loop through the range. However, I am hitting some performance issues (this UDF is several hundred times in the workbook) and am looking for a faster method. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Modify range variable passed through Function | Excel Programming | |||
ClearContents method on a passed range | New Users to Excel | |||
PrintOut macro from ?passed range.addrsess | Excel Programming | |||
segregating passed range by rows and columns | Excel Programming | |||
Translate range name passed as string to a custom function to range addresses! | Excel Programming |