Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, I'm trying to make a function that sums values from calls that have th same outline level. Idea is to calculate only cells until the next uppe level cell. Here is what I have done, but this function seems to be ver unefficient when I'm using that in many cells to calculate quite larg amount of data. Do you have any ideas how to make the same more efficient way? Function OutlineLevelSum(iLevel As Integer, rSumRange As Range) Dim rCell As Range Dim vResult For Each rCell In rSumRange If Rows(rCell.Row).OutlineLevel = iLevel Then vResult = vResult + rCell.Value ElseIf Rows(rCell.Row).OutlineLevel < iLevel Then Exit For End If Next rCell OutlineLevelSum = vResult End Functio -- Mar ----------------------------------------------------------------------- Marw's Profile: http://www.excelforum.com/member.php...fo&userid=2993 View this thread: http://www.excelforum.com/showthread.php?threadid=49635 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
calculate values in an unlimited range of cells in a column WITHOUTalso calculating values that had previously been filtered AGAINST? | Excel Discussion (Misc queries) | |||
How can I calculate the R and P values together | Excel Discussion (Misc queries) | |||
How to calculate values in multiple values with multi conditions | Excel Worksheet Functions | |||
look up same values in coumn1 and calculate values in 2nd column | Excel Worksheet Functions | |||
More efficient method to copy-paste values in place? | Excel Programming |