Count within a Range Q
Here is a nice simple formula
=SUM(--((INDEX(A5:A20,MIN(IF(A5:A20<"",ROW(A5:A20)-MIN(ROW(A5:A20))+1))):INDEX(A5:A20,MAX(IF(A5:A20< "",ROW(A5:A20)-MIN(ROW(A5:A20))+1))))<""))
which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.
Excel will automatically enclose the formula in braces (curly brackets), do
not try to do this manually.
When editing the formula, it must again be array-entered.
Note that you cannot use a whole column in array formulae (prior to excel
2007), but must use an explicit range.
--
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
"Sean" wrote in message
...
Would it be possible to count the number of empty cells in a column,
that fall between the first occupied cell and the last occupied cell
in a range.
For example if A5:A20 can be populated, but the first occupied cell is
A8 and the last occupied cell is A12, I wish to count only those cells
that are <blank between A8:A12
Another example would be if the first occupied cell was A13 and the
last occupied cell is A15, I wish to count only those cells that are
<blank between A13:A15
If you could visualise the above being Clock in / Out times, I wish to
know what part of the day there is no job allocated
Thanks
|