Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I know that it is faster to grab an range of cells and send it to an array.
Can I then access Range properties from that array? For example, I want to Sum all cells in a range that are not header rows (i.e. rows that contain a '+'). To do this, I need to check the OutlineLevel property. Example code: Public Function SumIfNotHeading(ByRef rng As Range) As Double SumIfNotHeading = 0 ' Add cell value if row has not a header Dim cell As Range For Each cell In rng If Not bIsHeading(cell) Then SumIfNotHeading = SumIfNotHeading + cell.Value End If Next cell End Function Function bIsHeading(ByRef rng As Range) As Boolean bIsHeading = (rng.EntireRow.OutlineLevel < rng.Offset(1, 0).EntireRow.OutlineLevel) End Function Is this possible, or is there a better way? Thanks. Matthew Pfluger |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Redimming an array dynamically assigned from range (how to redim first dimension of a 2-D array? /or/ reverse the original array order) | Excel Programming | |||
Array Properties in a Class | Excel Programming | |||
XL 2003: ListBox ListCount (and other) properties missing from Local Variables window | Excel Programming | |||
Save Cell Properties into an Array | Excel Programming | |||
How to use array formula for three variables? | Excel Discussion (Misc queries) |