Countif with nested function not working?

J

jshuatree

I'm attempting a countif that reads - COUNTIF(A:A,LEFT(A:A,1)=X)
Where column A looks something like:
XYZ
MNOP
XMN
LKJ
XTR

What's the proper way to do this?
Thanks
 
J

jshuatree

That helps but I should have also mentioned that my next step would b
to count those entries whose first letter was not X but also include
some other variable ie. ended with an O or had a integer greater tha
some amount.
I don't think this simple method will allow me to do this. As long a
I can figure out how to get the nested function to work properly I ca
manage the rest
 
J

JE McGimpsey

There is no nesting method with COUNTIF.

=COUNTIF(A:A,"X*") + COUNTIF(A:A, "*0") - COUNTIF(A:A,"X*0")

Or you could use the array-entered (CTRL-SHIFT-ENTER or CMD-RETURN):

=SUM((LEFT(A1:A1000,1)="X") + ((LEFT(A1:A1000,1)<>"X") *
(RIGHT(A1:A1000,1)="0")))
 
Top