CountIf formula

V

Verne

I am using a count if formula =COUNTIF(P2:p25,"x") - everytime I add a new
row, that row is not included in the formula. What can I do so it is
included. Right now, I have to add the row to the formula manaually. Thank
you for your help.
 
P

Per Jessen

Hi

Just enlarge the range to as many rows as you think you will need:

=COUNTIF(P2:p1000,"x")

Regards,
Per
 
M

Martin Fishlock

Try using p2:p26 and then insert a row after line 25 everytime.

Otherwise if the sheet is blank below the rows try p2:p2000.
 
J

JLatham

Try this:
=COUNTIF(P:p,"x")
this will work with COUNTIF() and some other functions, but not all.

Of course the catch here is that if there's an "x" in row 1, or if there are
entries below your current range of row 25 that are x's and you don't want
them counted, you can't use it as is. Another catch is that the formula
can't be in column P either (creates a circular reference error).
 
Z

Zhi Sheng

you can try this:
always include a blank row in your formula
say currently your data is from row 2 to row 25, instead of using
=COUNTIF(P2:p25,"x"), use =COUNTIF(P2:p26,"x"), row 26 being the blank row.
next time you insert a new row, do it on row 26 (ie right click row 26,
choose insert), this will insert a new row between 25 and 26, so the new row
could be included in the formula.
 

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