Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Can anyone suggest a more flexible substitute for the following formula? It
effectively counts the number of non-blank (0) rows in an array. This formula is limited, however, in that every column requires a separate statement. I would like to find a function that could handle an array of any size with a single statement. 1 0 0 1 1 0 0 0 0 0 0 1 3=SUM(IF((A1:A40)+(B1:B40)+(C1:C4),1,0)) It would be nice to use something like the array formula 1=OR(A1:C10) for every row in the entire array. Unfortunately, according to this document AND and OR functions cannot be nested within SUM+IF statements: http://support.microsoft.com/kb/267982/EN-US/ This is the VBA equivalent of what I am trying to do with an Excel formula: Dim oRow As Range Dim cNonBlanks As Long For Each oRow In Range("50:80").Rows If Application.CountA(oRow) < 0 Then cNonBlanks = cNonBlanks + 1 End If Next oRow Thanks |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I develop a macro to add blank rows to a list in Excel? | Excel Discussion (Misc queries) | |||
Pivot Tables & not printing blank rows (revisited) | Excel Worksheet Functions | |||
Display count of rows | Excel Worksheet Functions | |||
Getting Count field to recognise rows with negative values in Exc. | Excel Worksheet Functions | |||
How to delete blank rows | Excel Discussion (Misc queries) |