SOLVED

what formula can i use to count non blank cells

Copper Contributor

if i have the below spread sheet. i would be very grateful if anyone could let me know what formula i could use to count non blank spaces. i believe it is the if and then the counta formula, but i can't seem to get it to work.

 

any help is very welcomed.

 

Row No   Column    Column 

                  A               B

1                  1

2                  1              2

3

4                  1

5                  1

6                  1              3

7

8

9                  1

10                1

11                1

12                1              4

 

I am trying to add the non blank cells that are in column A before they are separated by a blank cell, and have this displayed on Column B.

 

Any help is welcomed. 

 

Thanks

 

Terence

2 Replies
best response confirmed by Terence019740 (Copper Contributor)
Solution

@Terence019740 

In B2:

 

=IF(AND(A2<>"", A3=""), COUNTA(A$1:A2)-SUM(B$1:B1), "")

 

Fill down.

@Hans Vogelaar thank you very much for your help.

1 best response

Accepted Solutions
best response confirmed by Terence019740 (Copper Contributor)
Solution

@Terence019740 

In B2:

 

=IF(AND(A2<>"", A3=""), COUNTA(A$1:A2)-SUM(B$1:B1), "")

 

Fill down.

View solution in original post