Count if array contains cells of a certain value
Tech-Archive recommends: Fix windows errors by optimizing your registry
This is an example of my table:
Row No.
1 Value Count
2 FALSE 0
3 FALSE 0
4 TRUE 0 (=countif($B$2:B4,TRUE))
5 FALSE 1 (=countif($B$2:B5,TRUE))
6 FALSE 0
7 TRUE 0
8 FALSE 1 (=countif($B$6:B8,TRUE))
9 TRUE 1 (=countif($B$6:B9,TRUE))
In column C, I want to count how many times the value "True" appears in
column B. But I only want to count from the array that stops the row ABOVE
the current one. The starting cell of the array will remain fixed for 4 rows
then it changes. In my example above, for Row No. 2-5, the starting cell is
$B$2. However, for Row No. -9, the starting cell is $B$6.
I want to copy this formula down 2000+ rows without having to manually
change the starting cell. Can this be done?
.
Relevant Pages
- RE: User List Box - List from Hidden range - VBA worng
... In your for loop, ... range is only 1 column wide this will be a single cell). ... Basic Editor type the word on it's own in lower case on a line and hit enter. ... in the array reference - and an array starts with element 0. ... (microsoft.public.excel.programming) - Re: Wrong data type returned from user-defined function
... If you want it to function as an array function then it needs to be ... Dim strFormula As String ... UnRound = CVErr ... would execute just as if I'd typed it in the cell myself. ... (microsoft.public.excel.programming) - RE: User List Box - List from Hidden range - VBA worng
... In your for loop, ... range is only 1 column wide this will be a single cell). ... Basic Editor type the word on it's own in lower case on a line and hit enter. ... in the array reference - and an array starts with element 0. ... (microsoft.public.excel.programming) - Re: Help with Totals Please
... In Cell AB3, the Total of 0 Matches, the Formula would be ... Re: Help with Totals Please ... Just turn on your macro recorder, ... look at the Help reference "About array formulas and how to enter them". ... (microsoft.public.excel.programming) - Re: Formula help
... Roger Govier ... These are mutually exclusive however for each cell within the range. ... Create an array of Ottawa and Toronto, ... (microsoft.public.excel.misc) |
|