count until blank cell

B

beto

Hi, I want to know how to count the number of cells in a column until i get
to a blank space.
Example:I have a certain set of numbers in Column A, All i want is to count
the number of cells taht I have in the first set of numbers. In this case
that would be the 23, 432, and 523. the count would be 3. But those number
will change maybe to be a total of 5.

=count(a1:"") ?

how can i do it?
countifs,? countif? aount?

Column A
23
432
523

543
543

345
234
234
 
T

T. Valko

My interpretation is that you want to count how many entries there are
*before* the first empty cell. So, if the first cell is empty the result
will be 0.

Maybe this array formula** :

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

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

Adjust for the correct end of range A20.
 
M

Mike H

Hi,

Try this ARRAY formula which assumes your data start in a1. If it's
simething else then change the A1 to the correct cell and A1000 to a number
larger than your data list are likely to be

=MATCH(1,--(A1:A1000=""),0)-1

This is an array formula which must be entered by pressing CTRL+Shift+Enter
'and not just Enter. If you do it correctly then Excel will put curly brackets
'around the formula {}. You can't type these yourself. If you edit the formula
'you must enter it again with CTRL+Shift+Enter.


--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top