# sum of consecutive counts without blanks

1. ## sum of consecutive counts without blanks

50
50
40

10

I have the above on , a1 to a6 , i need a formula to count and give me result 3  Register To Reply

2. ## Re: sum of consecutive counts without blanks

Try this:

=MAX(FREQUENCY(IF(A1:A6<>"",ROW(A1:A6)),IF(A1:A6="",ROW(A1:A6)))) Ctrl Shift Enter  Register To Reply

3. ## Re: sum of consecutive counts without blanks

Use this array formula:

=MIN(IF(A1:A6="",ROW(A1:A6)-ROW(A1)+1))-1

Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

Don't type the curly brackets yourself - it won't work...  Register To Reply

4. ## Re: sum of consecutive counts without blanks

Ignore my formula: it breaks down!! use 63 falcon..... 's one instead!!  Register To Reply

5. ## Re: sum of consecutive counts without blanks

Thank you 63 falcon dude , it sorted me out  Register To Reply

6. ## Re: sum of consecutive counts without blanks Originally Posted by makinmomb Thank you 63 falcon dude , sort me out  Register To Reply

7. ## Re: sum of consecutive counts without blanks

Falcon's doesn't work, either, You need this array formula:

=IF(MIN(IF(A1:A6="",ROW(A1:A6)-ROW(A1)+1))=0,ROW(A6),MIN(IF(A1:A6="",ROW(A1:A6)-ROW(A1)+1))-1)

On the attached sheet, delete the value in either A2 or A3...  Register To Reply

8. ## Re: sum of consecutive counts without blanks Originally Posted by Glenn Kennedy Falcon's doesn't work, either, You need this array formula:

=IF(MIN(IF(A1:A6="",ROW(A1:A6)-ROW(A1)+1))=0,ROW(A6),MIN(IF(A1:A6="",ROW(A1:A6)-ROW(A1)+1))-1)

On the attached sheet, delete the value in either A2 or A3...
The formula suggested in post #2 returns the maximum number of consecutive non-blank cells. I am assuming that is what the OP wanted.

If the OP was looking for the number of consecutive non-blank cells from the top of the column, then you are correct in saying that my formula will not do that.  Register To Reply

9. ## Re: sum of consecutive counts without blanks

Agreed, but I'll bet that he'd want 1, if a2 is blank. We'll see.  Register To Reply