+ Reply to Thread
Results 1 to 43 of 43

countif results

  1. #1
    Anne Troy
    Guest

    Re: countif results

    "True" (in quotes) means literal text. The text isn't literal. Rather "true"
    in this case is a value. So, you dont' need the quotes in your formula.

    =Countif(A10:A20,TRUE)
    *******************
    ~Anne Troy

    www.OfficeArticles.com


    "Lookin for a job" <Lookin for a [email protected]> wrote in
    message news:[email protected]...
    > Hello Guys..
    >
    > I have a range of IF formulas in A10:A20 that return either a text "True"
    > (not a boolean) or a blank "" .
    >
    > There are several "Trues" in the range but when I use -
    >
    > =Countif(A10:A20,"True")
    >
    > I get a result of 0.
    >
    > Why is this?
    >
    > Thanks




  2. #2
    Lookin for a job
    Guest

    Re: countif results

    That sounds reasonable.

    Plenty of alternatives available to avoid this but it just seemed like such
    a simple and basic formula that had me baffled.

    I've been using XL for years and can't ever remember running into this before.

    Thanks to everyone for their input.



    "JE McGimpsey" wrote:

    > I'm certainly not an authority, but I'll take a guess. The
    > implementation of COUNTIF() parses the comparison argument as a string,
    > so
    >
    > =COUNTIF(A10:A20,"=" & B1)
    >
    > will interpret the concatenated string and attempt to deduce the
    > argument type from the context. When a comparison operator is left out,
    > "=" is implied, so just as
    >
    > =COUNTIF(A10:A20,10)
    >
    > is syntactically equivalent to
    >
    > =COUNTIF(A10:A20,"=10")
    >
    > So
    >
    > =COUNTIF(A10:A20,"True")
    >
    > is syntactically equivalent to
    >
    > =COUNTIF(A10:A20,"=True")
    >
    > Obviously, the function parser will preferentially interpret arguments
    > as numbers or booleans rather than strings, so the boolean will be
    > matched.
    >
    > However, when you use a wildcard:
    >
    > =COUNTIF(A10:A20,"TRUE*")
    >
    > it forces the parser to interpret the argument as a string, and thus
    > match
    >
    >
    > In article <[email protected]>,
    > "Lookin for a job" <[email protected]> wrote:
    >
    > > What's the difference between -
    > >
    > > =Countif(A10:A20,"apples")
    > >
    > > and
    > >
    > > =Countif(A10:A20,"True")

    >


  3. #3
    JE McGimpsey
    Guest

    Re: countif results

    I'm certainly not an authority, but I'll take a guess. The
    implementation of COUNTIF() parses the comparison argument as a string,
    so

    =COUNTIF(A10:A20,"=" & B1)

    will interpret the concatenated string and attempt to deduce the
    argument type from the context. When a comparison operator is left out,
    "=" is implied, so just as

    =COUNTIF(A10:A20,10)

    is syntactically equivalent to

    =COUNTIF(A10:A20,"=10")

    So

    =COUNTIF(A10:A20,"True")

    is syntactically equivalent to

    =COUNTIF(A10:A20,"=True")

    Obviously, the function parser will preferentially interpret arguments
    as numbers or booleans rather than strings, so the boolean will be
    matched.

    However, when you use a wildcard:

    =COUNTIF(A10:A20,"TRUE*")

    it forces the parser to interpret the argument as a string, and thus
    match


    In article <[email protected]>,
    "Lookin for a job" <[email protected]> wrote:

    > What's the difference between -
    >
    > =Countif(A10:A20,"apples")
    >
    > and
    >
    > =Countif(A10:A20,"True")


  4. #4
    KL
    Guest

    Re: countif results

    Wow! That's weird. I can reproduce this in XL2K.

    KL


    "Lookin for a job" <[email protected]> wrote in
    message news:[email protected]...
    > Have a look see at this screencap -
    >
    > http://img177.imageshack.us/img177/9371/countif4tc.jpg
    >
    > It seems aparent to me that Countif doesn't like a text "True".
    >
    > I'm just wanting to know why.
    >
    > What's the difference between -
    >
    > =Countif(A10:A20,"apples")
    >
    > and
    >
    > =Countif(A10:A20,"True")
    >
    > Thanks
    >
    > "Anne Troy" wrote:
    >
    >> Okay. I think you'd better give us the exact formulas in your A10 to A20
    >> 'cause I can't replicate the problem you're having. Works for me whether
    >> "TRUE" or TRUE.
    >>
    >> *******************
    >> ~Anne Troy
    >>
    >> www.OfficeArticles.com
    >>
    >>
    >> "Lookin for a job" <[email protected]> wrote in
    >> message news:[email protected]...
    >> > That certainly will work but the Countif is more efficient.
    >> >
    >> > I changed the text true to the boolean TRUE.
    >> >
    >> > I really appreciate everyones help but can anyone answer the question
    >> > as

    >> to
    >> > why -
    >> >
    >> > =Countif(A10:A20,"true")
    >> >
    >> > returns 0 ???
    >> >
    >> > Thanks
    >> >
    >> > "kk" wrote:
    >> >
    >> > > Try this
    >> > >
    >> > > =SUMPRODUCT(--(A10:A20="TRUE"))
    >> > >
    >> > > Does it help?
    >> > >
    >> > >
    >> > > "Lookin for a job" <Lookin for a [email protected]> wrote
    >> > > in
    >> > > message news:[email protected]...
    >> > > Hello Guys..
    >> > >
    >> > > I have a range of IF formulas in A10:A20 that return either a text

    >> "True"
    >> > > (not a boolean) or a blank "" .
    >> > >
    >> > > There are several "Trues" in the range but when I use -
    >> > >
    >> > > =Countif(A10:A20,"True")
    >> > >
    >> > > I get a result of 0.
    >> > >
    >> > > Why is this?
    >> > >
    >> > > Thanks
    >> > >
    >> > >
    >> > >

    >>
    >>
    >>




  5. #5
    Lookin for a job
    Guest

    Re: countif results

    Have a look see at this screencap -

    http://img177.imageshack.us/img177/9371/countif4tc.jpg

    It seems aparent to me that Countif doesn't like a text "True".

    I'm just wanting to know why.

    What's the difference between -

    =Countif(A10:A20,"apples")

    and

    =Countif(A10:A20,"True")

    Thanks

    "Anne Troy" wrote:

    > Okay. I think you'd better give us the exact formulas in your A10 to A20
    > 'cause I can't replicate the problem you're having. Works for me whether
    > "TRUE" or TRUE.
    >
    > *******************
    > ~Anne Troy
    >
    > www.OfficeArticles.com
    >
    >
    > "Lookin for a job" <[email protected]> wrote in
    > message news:[email protected]...
    > > That certainly will work but the Countif is more efficient.
    > >
    > > I changed the text true to the boolean TRUE.
    > >
    > > I really appreciate everyones help but can anyone answer the question as

    > to
    > > why -
    > >
    > > =Countif(A10:A20,"true")
    > >
    > > returns 0 ???
    > >
    > > Thanks
    > >
    > > "kk" wrote:
    > >
    > > > Try this
    > > >
    > > > =SUMPRODUCT(--(A10:A20="TRUE"))
    > > >
    > > > Does it help?
    > > >
    > > >
    > > > "Lookin for a job" <Lookin for a [email protected]> wrote in
    > > > message news:[email protected]...
    > > > Hello Guys..
    > > >
    > > > I have a range of IF formulas in A10:A20 that return either a text

    > "True"
    > > > (not a boolean) or a blank "" .
    > > >
    > > > There are several "Trues" in the range but when I use -
    > > >
    > > > =Countif(A10:A20,"True")
    > > >
    > > > I get a result of 0.
    > > >
    > > > Why is this?
    > > >
    > > > Thanks
    > > >
    > > >
    > > >

    >
    >
    >


  6. #6
    JE McGimpsey
    Guest

    Re: countif results

    Hmm... not for me (XL03/04).

    Using
    =COUNTIF(A10:A20,TRUE)

    or

    =COUNTIF(A10:A20,"TRUE")

    fails to count cells in A10:A20 containing Text "TRUE".

    OTOH this counted Text "TRUE" but not boolean TRUE:

    =COUNTIF(A10:A20,"TRUE*")




    In article <[email protected]>,
    "Anne Troy" <[email protected]> wrote:

    > Okay. I think you'd better give us the exact formulas in your A10 to A20
    > 'cause I can't replicate the problem you're having. Works for me whether
    > "TRUE" or TRUE.
    >


  7. #7
    Anne Troy
    Guest

    Re: countif results

    Okay. I think you'd better give us the exact formulas in your A10 to A20
    'cause I can't replicate the problem you're having. Works for me whether
    "TRUE" or TRUE.

    *******************
    ~Anne Troy

    www.OfficeArticles.com


    "Lookin for a job" <[email protected]> wrote in
    message news:[email protected]...
    > That certainly will work but the Countif is more efficient.
    >
    > I changed the text true to the boolean TRUE.
    >
    > I really appreciate everyones help but can anyone answer the question as

    to
    > why -
    >
    > =Countif(A10:A20,"true")
    >
    > returns 0 ???
    >
    > Thanks
    >
    > "kk" wrote:
    >
    > > Try this
    > >
    > > =SUMPRODUCT(--(A10:A20="TRUE"))
    > >
    > > Does it help?
    > >
    > >
    > > "Lookin for a job" <Lookin for a [email protected]> wrote in
    > > message news:[email protected]...
    > > Hello Guys..
    > >
    > > I have a range of IF formulas in A10:A20 that return either a text

    "True"
    > > (not a boolean) or a blank "" .
    > >
    > > There are several "Trues" in the range but when I use -
    > >
    > > =Countif(A10:A20,"True")
    > >
    > > I get a result of 0.
    > >
    > > Why is this?
    > >
    > > Thanks
    > >
    > >
    > >




  8. #8
    Lookin for a job
    Guest

    Re: countif results

    That certainly will work but the Countif is more efficient.

    I changed the text true to the boolean TRUE.

    I really appreciate everyones help but can anyone answer the question as to
    why -

    =Countif(A10:A20,"true")

    returns 0 ???

    Thanks

    "kk" wrote:

    > Try this
    >
    > =SUMPRODUCT(--(A10:A20="TRUE"))
    >
    > Does it help?
    >
    >
    > "Lookin for a job" <Lookin for a [email protected]> wrote in
    > message news:[email protected]...
    > Hello Guys..
    >
    > I have a range of IF formulas in A10:A20 that return either a text "True"
    > (not a boolean) or a blank "" .
    >
    > There are several "Trues" in the range but when I use -
    >
    > =Countif(A10:A20,"True")
    >
    > I get a result of 0.
    >
    > Why is this?
    >
    > Thanks
    >
    >
    >


  9. #9
    Lookin for a job
    Guest

    Re: countif results

    That works and I'm absolutely certain that the IF formula uses the text value
    "true" and not the boolen value TRUE and there are no extra chars in the
    cells.

    I really appreciate everyones input and suggestions but does anybody know
    WHY -

    =Countif(A10:20,"true")

    Thanks

    "KL" wrote:

    > Hi,
    >
    > Since you are pretty confident that True is text and not a logical value,
    > why don't you try something like this (just in case there is an extra space
    > o something):
    >
    > =COUNTIF(A10:A20,"*True*")
    >
    > Regards,
    > KL
    >
    >
    > "Lookin for a job" <[email protected]> wrote in
    > message news:[email protected]...
    > > Hello Anne -
    > >
    > > That doesn't work as I had already tried that......still returns 0.
    > >
    > > What it is about True that causes this problem? In the IF formula when I
    > > change the text "True" to the boolean TRUE then use -
    > >
    > > =Countif(A10:A20,TRUE)
    > >
    > > I get the correct result.
    > >
    > > I guess I can use the boolean value but would still like to know why True
    > > doesn't get recognized ?????
    > >
    > > Thanks
    > >
    > > "Anne Troy" wrote:
    > >
    > >> "True" (in quotes) means literal text. The text isn't literal. Rather
    > >> "true"
    > >> in this case is a value. So, you dont' need the quotes in your formula.
    > >>
    > >> =Countif(A10:A20,TRUE)
    > >> *******************
    > >> ~Anne Troy
    > >>
    > >> www.OfficeArticles.com
    > >>
    > >>
    > >> "Lookin for a job" <Lookin for a [email protected]> wrote in
    > >> message news:[email protected]...
    > >> > Hello Guys..
    > >> >
    > >> > I have a range of IF formulas in A10:A20 that return either a text
    > >> > "True"
    > >> > (not a boolean) or a blank "" .
    > >> >
    > >> > There are several "Trues" in the range but when I use -
    > >> >
    > >> > =Countif(A10:A20,"True")
    > >> >
    > >> > I get a result of 0.
    > >> >
    > >> > Why is this?
    > >> >
    > >> > Thanks
    > >>
    > >>
    > >>

    >
    >
    >


  10. #10
    Lookin for a job
    Guest

    Re: countif results

    > =IF(A1>2,"True","False")
    >
    > can be written
    >
    > =A1>2


    Yes it can but I don't want a FALSE return. I want "".

    I can use the boolean TRUE -

    =IF(A1>2,True,"")

    But why doesn't "true" get recognized?

    What's the difference between "apples" and "true" in a Countif?

    Seems to me there is none ???

    Thanks

    "Peo Sjoblom" wrote:

    > Why would you even type in true in an if formula? E.g.
    >
    > =IF(A1>2,"True","False")
    >
    > can be written
    >
    > =A1>2
    >
    > instead, there is no need to write true or false
    >
    > --
    > Regards,
    >
    > Peo Sjoblom
    >
    > (No private emails please)
    >
    >
    > "Lookin for a job" <[email protected]> wrote in
    > message news:[email protected]...
    > > Hello Anne -
    > >
    > > That doesn't work as I had already tried that......still returns 0.
    > >
    > > What it is about True that causes this problem? In the IF formula when I
    > > change the text "True" to the boolean TRUE then use -
    > >
    > > =Countif(A10:A20,TRUE)
    > >
    > > I get the correct result.
    > >
    > > I guess I can use the boolean value but would still like to know why True
    > > doesn't get recognized ?????
    > >
    > > Thanks
    > >
    > > "Anne Troy" wrote:
    > >
    > >> "True" (in quotes) means literal text. The text isn't literal. Rather
    > >> "true"
    > >> in this case is a value. So, you dont' need the quotes in your formula.
    > >>
    > >> =Countif(A10:A20,TRUE)
    > >> *******************
    > >> ~Anne Troy
    > >>
    > >> www.OfficeArticles.com
    > >>
    > >>
    > >> "Lookin for a job" <Lookin for a [email protected]> wrote in
    > >> message news:[email protected]...
    > >> > Hello Guys..
    > >> >
    > >> > I have a range of IF formulas in A10:A20 that return either a text
    > >> > "True"
    > >> > (not a boolean) or a blank "" .
    > >> >
    > >> > There are several "Trues" in the range but when I use -
    > >> >
    > >> > =Countif(A10:A20,"True")
    > >> >
    > >> > I get a result of 0.
    > >> >
    > >> > Why is this?
    > >> >
    > >> > Thanks
    > >>
    > >>
    > >>

    >
    >


  11. #11
    Peo Sjoblom
    Guest

    Re: countif results

    Why would you even type in true in an if formula? E.g.

    =IF(A1>2,"True","False")

    can be written

    =A1>2

    instead, there is no need to write true or false

    --
    Regards,

    Peo Sjoblom

    (No private emails please)


    "Lookin for a job" <[email protected]> wrote in
    message news:[email protected]...
    > Hello Anne -
    >
    > That doesn't work as I had already tried that......still returns 0.
    >
    > What it is about True that causes this problem? In the IF formula when I
    > change the text "True" to the boolean TRUE then use -
    >
    > =Countif(A10:A20,TRUE)
    >
    > I get the correct result.
    >
    > I guess I can use the boolean value but would still like to know why True
    > doesn't get recognized ?????
    >
    > Thanks
    >
    > "Anne Troy" wrote:
    >
    >> "True" (in quotes) means literal text. The text isn't literal. Rather
    >> "true"
    >> in this case is a value. So, you dont' need the quotes in your formula.
    >>
    >> =Countif(A10:A20,TRUE)
    >> *******************
    >> ~Anne Troy
    >>
    >> www.OfficeArticles.com
    >>
    >>
    >> "Lookin for a job" <Lookin for a [email protected]> wrote in
    >> message news:[email protected]...
    >> > Hello Guys..
    >> >
    >> > I have a range of IF formulas in A10:A20 that return either a text
    >> > "True"
    >> > (not a boolean) or a blank "" .
    >> >
    >> > There are several "Trues" in the range but when I use -
    >> >
    >> > =Countif(A10:A20,"True")
    >> >
    >> > I get a result of 0.
    >> >
    >> > Why is this?
    >> >
    >> > Thanks

    >>
    >>
    >>



  12. #12
    KL
    Guest

    Re: countif results

    Hi,

    Since you are pretty confident that True is text and not a logical value,
    why don't you try something like this (just in case there is an extra space
    o something):

    =COUNTIF(A10:A20,"*True*")

    Regards,
    KL


    "Lookin for a job" <[email protected]> wrote in
    message news:[email protected]...
    > Hello Anne -
    >
    > That doesn't work as I had already tried that......still returns 0.
    >
    > What it is about True that causes this problem? In the IF formula when I
    > change the text "True" to the boolean TRUE then use -
    >
    > =Countif(A10:A20,TRUE)
    >
    > I get the correct result.
    >
    > I guess I can use the boolean value but would still like to know why True
    > doesn't get recognized ?????
    >
    > Thanks
    >
    > "Anne Troy" wrote:
    >
    >> "True" (in quotes) means literal text. The text isn't literal. Rather
    >> "true"
    >> in this case is a value. So, you dont' need the quotes in your formula.
    >>
    >> =Countif(A10:A20,TRUE)
    >> *******************
    >> ~Anne Troy
    >>
    >> www.OfficeArticles.com
    >>
    >>
    >> "Lookin for a job" <Lookin for a [email protected]> wrote in
    >> message news:[email protected]...
    >> > Hello Guys..
    >> >
    >> > I have a range of IF formulas in A10:A20 that return either a text
    >> > "True"
    >> > (not a boolean) or a blank "" .
    >> >
    >> > There are several "Trues" in the range but when I use -
    >> >
    >> > =Countif(A10:A20,"True")
    >> >
    >> > I get a result of 0.
    >> >
    >> > Why is this?
    >> >
    >> > Thanks

    >>
    >>
    >>




  13. #13
    Lookin for a job
    Guest

    Re: countif results

    Hello Anne -

    That doesn't work as I had already tried that......still returns 0.

    What it is about True that causes this problem? In the IF formula when I
    change the text "True" to the boolean TRUE then use -

    =Countif(A10:A20,TRUE)

    I get the correct result.

    I guess I can use the boolean value but would still like to know why True
    doesn't get recognized ?????

    Thanks

    "Anne Troy" wrote:

    > "True" (in quotes) means literal text. The text isn't literal. Rather "true"
    > in this case is a value. So, you dont' need the quotes in your formula.
    >
    > =Countif(A10:A20,TRUE)
    > *******************
    > ~Anne Troy
    >
    > www.OfficeArticles.com
    >
    >
    > "Lookin for a job" <Lookin for a [email protected]> wrote in
    > message news:[email protected]...
    > > Hello Guys..
    > >
    > > I have a range of IF formulas in A10:A20 that return either a text "True"
    > > (not a boolean) or a blank "" .
    > >
    > > There are several "Trues" in the range but when I use -
    > >
    > > =Countif(A10:A20,"True")
    > >
    > > I get a result of 0.
    > >
    > > Why is this?
    > >
    > > Thanks

    >
    >
    >


  14. #14
    kk
    Guest

    Re: countif results

    Try this

    =SUMPRODUCT(--(A10:A20="TRUE"))

    Does it help?


    "Lookin for a job" <Lookin for a [email protected]> wrote in
    message news:[email protected]...
    Hello Guys..

    I have a range of IF formulas in A10:A20 that return either a text "True"
    (not a boolean) or a blank "" .

    There are several "Trues" in the range but when I use -

    =Countif(A10:A20,"True")

    I get a result of 0.

    Why is this?

    Thanks



  15. #15
    Lookin for a job
    Guest

    Re: countif results

    That certainly will work but the Countif is more efficient.

    I changed the text true to the boolean TRUE.

    I really appreciate everyones help but can anyone answer the question as to
    why -

    =Countif(A10:A20,"true")

    returns 0 ???

    Thanks

    "kk" wrote:

    > Try this
    >
    > =SUMPRODUCT(--(A10:A20="TRUE"))
    >
    > Does it help?
    >
    >
    > "Lookin for a job" <Lookin for a [email protected]> wrote in
    > message news:[email protected]...
    > Hello Guys..
    >
    > I have a range of IF formulas in A10:A20 that return either a text "True"
    > (not a boolean) or a blank "" .
    >
    > There are several "Trues" in the range but when I use -
    >
    > =Countif(A10:A20,"True")
    >
    > I get a result of 0.
    >
    > Why is this?
    >
    > Thanks
    >
    >
    >


  16. #16
    Anne Troy
    Guest

    Re: countif results

    "True" (in quotes) means literal text. The text isn't literal. Rather "true"
    in this case is a value. So, you dont' need the quotes in your formula.

    =Countif(A10:A20,TRUE)
    *******************
    ~Anne Troy

    www.OfficeArticles.com


    "Lookin for a job" <Lookin for a [email protected]> wrote in
    message news:[email protected]...
    > Hello Guys..
    >
    > I have a range of IF formulas in A10:A20 that return either a text "True"
    > (not a boolean) or a blank "" .
    >
    > There are several "Trues" in the range but when I use -
    >
    > =Countif(A10:A20,"True")
    >
    > I get a result of 0.
    >
    > Why is this?
    >
    > Thanks




  17. #17
    Lookin for a job
    Guest

    Re: countif results

    Hello Anne -

    That doesn't work as I had already tried that......still returns 0.

    What it is about True that causes this problem? In the IF formula when I
    change the text "True" to the boolean TRUE then use -

    =Countif(A10:A20,TRUE)

    I get the correct result.

    I guess I can use the boolean value but would still like to know why True
    doesn't get recognized ?????

    Thanks

    "Anne Troy" wrote:

    > "True" (in quotes) means literal text. The text isn't literal. Rather "true"
    > in this case is a value. So, you dont' need the quotes in your formula.
    >
    > =Countif(A10:A20,TRUE)
    > *******************
    > ~Anne Troy
    >
    > www.OfficeArticles.com
    >
    >
    > "Lookin for a job" <Lookin for a [email protected]> wrote in
    > message news:[email protected]...
    > > Hello Guys..
    > >
    > > I have a range of IF formulas in A10:A20 that return either a text "True"
    > > (not a boolean) or a blank "" .
    > >
    > > There are several "Trues" in the range but when I use -
    > >
    > > =Countif(A10:A20,"True")
    > >
    > > I get a result of 0.
    > >
    > > Why is this?
    > >
    > > Thanks

    >
    >
    >


  18. #18
    kk
    Guest

    Re: countif results

    Try this

    =SUMPRODUCT(--(A10:A20="TRUE"))

    Does it help?


    "Lookin for a job" <Lookin for a [email protected]> wrote in
    message news:[email protected]...
    Hello Guys..

    I have a range of IF formulas in A10:A20 that return either a text "True"
    (not a boolean) or a blank "" .

    There are several "Trues" in the range but when I use -

    =Countif(A10:A20,"True")

    I get a result of 0.

    Why is this?

    Thanks



  19. #19
    Peo Sjoblom
    Guest

    Re: countif results

    Why would you even type in true in an if formula? E.g.

    =IF(A1>2,"True","False")

    can be written

    =A1>2

    instead, there is no need to write true or false

    --
    Regards,

    Peo Sjoblom

    (No private emails please)


    "Lookin for a job" <[email protected]> wrote in
    message news:[email protected]...
    > Hello Anne -
    >
    > That doesn't work as I had already tried that......still returns 0.
    >
    > What it is about True that causes this problem? In the IF formula when I
    > change the text "True" to the boolean TRUE then use -
    >
    > =Countif(A10:A20,TRUE)
    >
    > I get the correct result.
    >
    > I guess I can use the boolean value but would still like to know why True
    > doesn't get recognized ?????
    >
    > Thanks
    >
    > "Anne Troy" wrote:
    >
    >> "True" (in quotes) means literal text. The text isn't literal. Rather
    >> "true"
    >> in this case is a value. So, you dont' need the quotes in your formula.
    >>
    >> =Countif(A10:A20,TRUE)
    >> *******************
    >> ~Anne Troy
    >>
    >> www.OfficeArticles.com
    >>
    >>
    >> "Lookin for a job" <Lookin for a [email protected]> wrote in
    >> message news:[email protected]...
    >> > Hello Guys..
    >> >
    >> > I have a range of IF formulas in A10:A20 that return either a text
    >> > "True"
    >> > (not a boolean) or a blank "" .
    >> >
    >> > There are several "Trues" in the range but when I use -
    >> >
    >> > =Countif(A10:A20,"True")
    >> >
    >> > I get a result of 0.
    >> >
    >> > Why is this?
    >> >
    >> > Thanks

    >>
    >>
    >>



  20. #20
    KL
    Guest

    Re: countif results

    Hi,

    Since you are pretty confident that True is text and not a logical value,
    why don't you try something like this (just in case there is an extra space
    o something):

    =COUNTIF(A10:A20,"*True*")

    Regards,
    KL


    "Lookin for a job" <[email protected]> wrote in
    message news:[email protected]...
    > Hello Anne -
    >
    > That doesn't work as I had already tried that......still returns 0.
    >
    > What it is about True that causes this problem? In the IF formula when I
    > change the text "True" to the boolean TRUE then use -
    >
    > =Countif(A10:A20,TRUE)
    >
    > I get the correct result.
    >
    > I guess I can use the boolean value but would still like to know why True
    > doesn't get recognized ?????
    >
    > Thanks
    >
    > "Anne Troy" wrote:
    >
    >> "True" (in quotes) means literal text. The text isn't literal. Rather
    >> "true"
    >> in this case is a value. So, you dont' need the quotes in your formula.
    >>
    >> =Countif(A10:A20,TRUE)
    >> *******************
    >> ~Anne Troy
    >>
    >> www.OfficeArticles.com
    >>
    >>
    >> "Lookin for a job" <Lookin for a [email protected]> wrote in
    >> message news:[email protected]...
    >> > Hello Guys..
    >> >
    >> > I have a range of IF formulas in A10:A20 that return either a text
    >> > "True"
    >> > (not a boolean) or a blank "" .
    >> >
    >> > There are several "Trues" in the range but when I use -
    >> >
    >> > =Countif(A10:A20,"True")
    >> >
    >> > I get a result of 0.
    >> >
    >> > Why is this?
    >> >
    >> > Thanks

    >>
    >>
    >>




  21. #21
    Lookin for a job
    Guest

    Re: countif results

    > =IF(A1>2,"True","False")
    >
    > can be written
    >
    > =A1>2


    Yes it can but I don't want a FALSE return. I want "".

    I can use the boolean TRUE -

    =IF(A1>2,True,"")

    But why doesn't "true" get recognized?

    What's the difference between "apples" and "true" in a Countif?

    Seems to me there is none ???

    Thanks

    "Peo Sjoblom" wrote:

    > Why would you even type in true in an if formula? E.g.
    >
    > =IF(A1>2,"True","False")
    >
    > can be written
    >
    > =A1>2
    >
    > instead, there is no need to write true or false
    >
    > --
    > Regards,
    >
    > Peo Sjoblom
    >
    > (No private emails please)
    >
    >
    > "Lookin for a job" <[email protected]> wrote in
    > message news:[email protected]...
    > > Hello Anne -
    > >
    > > That doesn't work as I had already tried that......still returns 0.
    > >
    > > What it is about True that causes this problem? In the IF formula when I
    > > change the text "True" to the boolean TRUE then use -
    > >
    > > =Countif(A10:A20,TRUE)
    > >
    > > I get the correct result.
    > >
    > > I guess I can use the boolean value but would still like to know why True
    > > doesn't get recognized ?????
    > >
    > > Thanks
    > >
    > > "Anne Troy" wrote:
    > >
    > >> "True" (in quotes) means literal text. The text isn't literal. Rather
    > >> "true"
    > >> in this case is a value. So, you dont' need the quotes in your formula.
    > >>
    > >> =Countif(A10:A20,TRUE)
    > >> *******************
    > >> ~Anne Troy
    > >>
    > >> www.OfficeArticles.com
    > >>
    > >>
    > >> "Lookin for a job" <Lookin for a [email protected]> wrote in
    > >> message news:[email protected]...
    > >> > Hello Guys..
    > >> >
    > >> > I have a range of IF formulas in A10:A20 that return either a text
    > >> > "True"
    > >> > (not a boolean) or a blank "" .
    > >> >
    > >> > There are several "Trues" in the range but when I use -
    > >> >
    > >> > =Countif(A10:A20,"True")
    > >> >
    > >> > I get a result of 0.
    > >> >
    > >> > Why is this?
    > >> >
    > >> > Thanks
    > >>
    > >>
    > >>

    >
    >


  22. #22
    Lookin for a job
    Guest

    Re: countif results

    That works and I'm absolutely certain that the IF formula uses the text value
    "true" and not the boolen value TRUE and there are no extra chars in the
    cells.

    I really appreciate everyones input and suggestions but does anybody know
    WHY -

    =Countif(A10:20,"true")

    Thanks

    "KL" wrote:

    > Hi,
    >
    > Since you are pretty confident that True is text and not a logical value,
    > why don't you try something like this (just in case there is an extra space
    > o something):
    >
    > =COUNTIF(A10:A20,"*True*")
    >
    > Regards,
    > KL
    >
    >
    > "Lookin for a job" <[email protected]> wrote in
    > message news:[email protected]...
    > > Hello Anne -
    > >
    > > That doesn't work as I had already tried that......still returns 0.
    > >
    > > What it is about True that causes this problem? In the IF formula when I
    > > change the text "True" to the boolean TRUE then use -
    > >
    > > =Countif(A10:A20,TRUE)
    > >
    > > I get the correct result.
    > >
    > > I guess I can use the boolean value but would still like to know why True
    > > doesn't get recognized ?????
    > >
    > > Thanks
    > >
    > > "Anne Troy" wrote:
    > >
    > >> "True" (in quotes) means literal text. The text isn't literal. Rather
    > >> "true"
    > >> in this case is a value. So, you dont' need the quotes in your formula.
    > >>
    > >> =Countif(A10:A20,TRUE)
    > >> *******************
    > >> ~Anne Troy
    > >>
    > >> www.OfficeArticles.com
    > >>
    > >>
    > >> "Lookin for a job" <Lookin for a [email protected]> wrote in
    > >> message news:[email protected]...
    > >> > Hello Guys..
    > >> >
    > >> > I have a range of IF formulas in A10:A20 that return either a text
    > >> > "True"
    > >> > (not a boolean) or a blank "" .
    > >> >
    > >> > There are several "Trues" in the range but when I use -
    > >> >
    > >> > =Countif(A10:A20,"True")
    > >> >
    > >> > I get a result of 0.
    > >> >
    > >> > Why is this?
    > >> >
    > >> > Thanks
    > >>
    > >>
    > >>

    >
    >
    >


  23. #23
    Anne Troy
    Guest

    Re: countif results

    Okay. I think you'd better give us the exact formulas in your A10 to A20
    'cause I can't replicate the problem you're having. Works for me whether
    "TRUE" or TRUE.

    *******************
    ~Anne Troy

    www.OfficeArticles.com


    "Lookin for a job" <[email protected]> wrote in
    message news:[email protected]...
    > That certainly will work but the Countif is more efficient.
    >
    > I changed the text true to the boolean TRUE.
    >
    > I really appreciate everyones help but can anyone answer the question as

    to
    > why -
    >
    > =Countif(A10:A20,"true")
    >
    > returns 0 ???
    >
    > Thanks
    >
    > "kk" wrote:
    >
    > > Try this
    > >
    > > =SUMPRODUCT(--(A10:A20="TRUE"))
    > >
    > > Does it help?
    > >
    > >
    > > "Lookin for a job" <Lookin for a [email protected]> wrote in
    > > message news:[email protected]...
    > > Hello Guys..
    > >
    > > I have a range of IF formulas in A10:A20 that return either a text

    "True"
    > > (not a boolean) or a blank "" .
    > >
    > > There are several "Trues" in the range but when I use -
    > >
    > > =Countif(A10:A20,"True")
    > >
    > > I get a result of 0.
    > >
    > > Why is this?
    > >
    > > Thanks
    > >
    > >
    > >




  24. #24
    JE McGimpsey
    Guest

    Re: countif results

    Hmm... not for me (XL03/04).

    Using
    =COUNTIF(A10:A20,TRUE)

    or

    =COUNTIF(A10:A20,"TRUE")

    fails to count cells in A10:A20 containing Text "TRUE".

    OTOH this counted Text "TRUE" but not boolean TRUE:

    =COUNTIF(A10:A20,"TRUE*")




    In article <[email protected]>,
    "Anne Troy" <[email protected]> wrote:

    > Okay. I think you'd better give us the exact formulas in your A10 to A20
    > 'cause I can't replicate the problem you're having. Works for me whether
    > "TRUE" or TRUE.
    >


  25. #25
    Lookin for a job
    Guest

    Re: countif results

    Have a look see at this screencap -

    http://img177.imageshack.us/img177/9371/countif4tc.jpg

    It seems aparent to me that Countif doesn't like a text "True".

    I'm just wanting to know why.

    What's the difference between -

    =Countif(A10:A20,"apples")

    and

    =Countif(A10:A20,"True")

    Thanks

    "Anne Troy" wrote:

    > Okay. I think you'd better give us the exact formulas in your A10 to A20
    > 'cause I can't replicate the problem you're having. Works for me whether
    > "TRUE" or TRUE.
    >
    > *******************
    > ~Anne Troy
    >
    > www.OfficeArticles.com
    >
    >
    > "Lookin for a job" <[email protected]> wrote in
    > message news:[email protected]...
    > > That certainly will work but the Countif is more efficient.
    > >
    > > I changed the text true to the boolean TRUE.
    > >
    > > I really appreciate everyones help but can anyone answer the question as

    > to
    > > why -
    > >
    > > =Countif(A10:A20,"true")
    > >
    > > returns 0 ???
    > >
    > > Thanks
    > >
    > > "kk" wrote:
    > >
    > > > Try this
    > > >
    > > > =SUMPRODUCT(--(A10:A20="TRUE"))
    > > >
    > > > Does it help?
    > > >
    > > >
    > > > "Lookin for a job" <Lookin for a [email protected]> wrote in
    > > > message news:[email protected]...
    > > > Hello Guys..
    > > >
    > > > I have a range of IF formulas in A10:A20 that return either a text

    > "True"
    > > > (not a boolean) or a blank "" .
    > > >
    > > > There are several "Trues" in the range but when I use -
    > > >
    > > > =Countif(A10:A20,"True")
    > > >
    > > > I get a result of 0.
    > > >
    > > > Why is this?
    > > >
    > > > Thanks
    > > >
    > > >
    > > >

    >
    >
    >


  26. #26
    KL
    Guest

    Re: countif results

    Wow! That's weird. I can reproduce this in XL2K.

    KL


    "Lookin for a job" <[email protected]> wrote in
    message news:[email protected]...
    > Have a look see at this screencap -
    >
    > http://img177.imageshack.us/img177/9371/countif4tc.jpg
    >
    > It seems aparent to me that Countif doesn't like a text "True".
    >
    > I'm just wanting to know why.
    >
    > What's the difference between -
    >
    > =Countif(A10:A20,"apples")
    >
    > and
    >
    > =Countif(A10:A20,"True")
    >
    > Thanks
    >
    > "Anne Troy" wrote:
    >
    >> Okay. I think you'd better give us the exact formulas in your A10 to A20
    >> 'cause I can't replicate the problem you're having. Works for me whether
    >> "TRUE" or TRUE.
    >>
    >> *******************
    >> ~Anne Troy
    >>
    >> www.OfficeArticles.com
    >>
    >>
    >> "Lookin for a job" <[email protected]> wrote in
    >> message news:[email protected]...
    >> > That certainly will work but the Countif is more efficient.
    >> >
    >> > I changed the text true to the boolean TRUE.
    >> >
    >> > I really appreciate everyones help but can anyone answer the question
    >> > as

    >> to
    >> > why -
    >> >
    >> > =Countif(A10:A20,"true")
    >> >
    >> > returns 0 ???
    >> >
    >> > Thanks
    >> >
    >> > "kk" wrote:
    >> >
    >> > > Try this
    >> > >
    >> > > =SUMPRODUCT(--(A10:A20="TRUE"))
    >> > >
    >> > > Does it help?
    >> > >
    >> > >
    >> > > "Lookin for a job" <Lookin for a [email protected]> wrote
    >> > > in
    >> > > message news:[email protected]...
    >> > > Hello Guys..
    >> > >
    >> > > I have a range of IF formulas in A10:A20 that return either a text

    >> "True"
    >> > > (not a boolean) or a blank "" .
    >> > >
    >> > > There are several "Trues" in the range but when I use -
    >> > >
    >> > > =Countif(A10:A20,"True")
    >> > >
    >> > > I get a result of 0.
    >> > >
    >> > > Why is this?
    >> > >
    >> > > Thanks
    >> > >
    >> > >
    >> > >

    >>
    >>
    >>




  27. #27
    JE McGimpsey
    Guest

    Re: countif results

    I'm certainly not an authority, but I'll take a guess. The
    implementation of COUNTIF() parses the comparison argument as a string,
    so

    =COUNTIF(A10:A20,"=" & B1)

    will interpret the concatenated string and attempt to deduce the
    argument type from the context. When a comparison operator is left out,
    "=" is implied, so just as

    =COUNTIF(A10:A20,10)

    is syntactically equivalent to

    =COUNTIF(A10:A20,"=10")

    So

    =COUNTIF(A10:A20,"True")

    is syntactically equivalent to

    =COUNTIF(A10:A20,"=True")

    Obviously, the function parser will preferentially interpret arguments
    as numbers or booleans rather than strings, so the boolean will be
    matched.

    However, when you use a wildcard:

    =COUNTIF(A10:A20,"TRUE*")

    it forces the parser to interpret the argument as a string, and thus
    match


    In article <[email protected]>,
    "Lookin for a job" <[email protected]> wrote:

    > What's the difference between -
    >
    > =Countif(A10:A20,"apples")
    >
    > and
    >
    > =Countif(A10:A20,"True")


  28. #28
    Lookin for a job
    Guest

    Re: countif results

    That sounds reasonable.

    Plenty of alternatives available to avoid this but it just seemed like such
    a simple and basic formula that had me baffled.

    I've been using XL for years and can't ever remember running into this before.

    Thanks to everyone for their input.



    "JE McGimpsey" wrote:

    > I'm certainly not an authority, but I'll take a guess. The
    > implementation of COUNTIF() parses the comparison argument as a string,
    > so
    >
    > =COUNTIF(A10:A20,"=" & B1)
    >
    > will interpret the concatenated string and attempt to deduce the
    > argument type from the context. When a comparison operator is left out,
    > "=" is implied, so just as
    >
    > =COUNTIF(A10:A20,10)
    >
    > is syntactically equivalent to
    >
    > =COUNTIF(A10:A20,"=10")
    >
    > So
    >
    > =COUNTIF(A10:A20,"True")
    >
    > is syntactically equivalent to
    >
    > =COUNTIF(A10:A20,"=True")
    >
    > Obviously, the function parser will preferentially interpret arguments
    > as numbers or booleans rather than strings, so the boolean will be
    > matched.
    >
    > However, when you use a wildcard:
    >
    > =COUNTIF(A10:A20,"TRUE*")
    >
    > it forces the parser to interpret the argument as a string, and thus
    > match
    >
    >
    > In article <[email protected]>,
    > "Lookin for a job" <[email protected]> wrote:
    >
    > > What's the difference between -
    > >
    > > =Countif(A10:A20,"apples")
    > >
    > > and
    > >
    > > =Countif(A10:A20,"True")

    >


  29. #29
    Anne Troy
    Guest

    Re: countif results

    "True" (in quotes) means literal text. The text isn't literal. Rather "true"
    in this case is a value. So, you dont' need the quotes in your formula.

    =Countif(A10:A20,TRUE)
    *******************
    ~Anne Troy

    www.OfficeArticles.com


    "Lookin for a job" <Lookin for a [email protected]> wrote in
    message news:[email protected]...
    > Hello Guys..
    >
    > I have a range of IF formulas in A10:A20 that return either a text "True"
    > (not a boolean) or a blank "" .
    >
    > There are several "Trues" in the range but when I use -
    >
    > =Countif(A10:A20,"True")
    >
    > I get a result of 0.
    >
    > Why is this?
    >
    > Thanks




  30. #30
    Lookin for a job
    Guest

    countif results

    Hello Guys..

    I have a range of IF formulas in A10:A20 that return either a text "True"
    (not a boolean) or a blank "" .

    There are several "Trues" in the range but when I use -

    =Countif(A10:A20,"True")

    I get a result of 0.

    Why is this?

    Thanks

  31. #31
    Lookin for a job
    Guest

    Re: countif results

    That sounds reasonable.

    Plenty of alternatives available to avoid this but it just seemed like such
    a simple and basic formula that had me baffled.

    I've been using XL for years and can't ever remember running into this before.

    Thanks to everyone for their input.



    "JE McGimpsey" wrote:

    > I'm certainly not an authority, but I'll take a guess. The
    > implementation of COUNTIF() parses the comparison argument as a string,
    > so
    >
    > =COUNTIF(A10:A20,"=" & B1)
    >
    > will interpret the concatenated string and attempt to deduce the
    > argument type from the context. When a comparison operator is left out,
    > "=" is implied, so just as
    >
    > =COUNTIF(A10:A20,10)
    >
    > is syntactically equivalent to
    >
    > =COUNTIF(A10:A20,"=10")
    >
    > So
    >
    > =COUNTIF(A10:A20,"True")
    >
    > is syntactically equivalent to
    >
    > =COUNTIF(A10:A20,"=True")
    >
    > Obviously, the function parser will preferentially interpret arguments
    > as numbers or booleans rather than strings, so the boolean will be
    > matched.
    >
    > However, when you use a wildcard:
    >
    > =COUNTIF(A10:A20,"TRUE*")
    >
    > it forces the parser to interpret the argument as a string, and thus
    > match
    >
    >
    > In article <[email protected]>,
    > "Lookin for a job" <[email protected]> wrote:
    >
    > > What's the difference between -
    > >
    > > =Countif(A10:A20,"apples")
    > >
    > > and
    > >
    > > =Countif(A10:A20,"True")

    >


  32. #32
    JE McGimpsey
    Guest

    Re: countif results

    I'm certainly not an authority, but I'll take a guess. The
    implementation of COUNTIF() parses the comparison argument as a string,
    so

    =COUNTIF(A10:A20,"=" & B1)

    will interpret the concatenated string and attempt to deduce the
    argument type from the context. When a comparison operator is left out,
    "=" is implied, so just as

    =COUNTIF(A10:A20,10)

    is syntactically equivalent to

    =COUNTIF(A10:A20,"=10")

    So

    =COUNTIF(A10:A20,"True")

    is syntactically equivalent to

    =COUNTIF(A10:A20,"=True")

    Obviously, the function parser will preferentially interpret arguments
    as numbers or booleans rather than strings, so the boolean will be
    matched.

    However, when you use a wildcard:

    =COUNTIF(A10:A20,"TRUE*")

    it forces the parser to interpret the argument as a string, and thus
    match


    In article <[email protected]>,
    "Lookin for a job" <[email protected]> wrote:

    > What's the difference between -
    >
    > =Countif(A10:A20,"apples")
    >
    > and
    >
    > =Countif(A10:A20,"True")


  33. #33
    KL
    Guest

    Re: countif results

    Wow! That's weird. I can reproduce this in XL2K.

    KL


    "Lookin for a job" <[email protected]> wrote in
    message news:[email protected]...
    > Have a look see at this screencap -
    >
    > http://img177.imageshack.us/img177/9371/countif4tc.jpg
    >
    > It seems aparent to me that Countif doesn't like a text "True".
    >
    > I'm just wanting to know why.
    >
    > What's the difference between -
    >
    > =Countif(A10:A20,"apples")
    >
    > and
    >
    > =Countif(A10:A20,"True")
    >
    > Thanks
    >
    > "Anne Troy" wrote:
    >
    >> Okay. I think you'd better give us the exact formulas in your A10 to A20
    >> 'cause I can't replicate the problem you're having. Works for me whether
    >> "TRUE" or TRUE.
    >>
    >> *******************
    >> ~Anne Troy
    >>
    >> www.OfficeArticles.com
    >>
    >>
    >> "Lookin for a job" <[email protected]> wrote in
    >> message news:[email protected]...
    >> > That certainly will work but the Countif is more efficient.
    >> >
    >> > I changed the text true to the boolean TRUE.
    >> >
    >> > I really appreciate everyones help but can anyone answer the question
    >> > as

    >> to
    >> > why -
    >> >
    >> > =Countif(A10:A20,"true")
    >> >
    >> > returns 0 ???
    >> >
    >> > Thanks
    >> >
    >> > "kk" wrote:
    >> >
    >> > > Try this
    >> > >
    >> > > =SUMPRODUCT(--(A10:A20="TRUE"))
    >> > >
    >> > > Does it help?
    >> > >
    >> > >
    >> > > "Lookin for a job" <Lookin for a [email protected]> wrote
    >> > > in
    >> > > message news:[email protected]...
    >> > > Hello Guys..
    >> > >
    >> > > I have a range of IF formulas in A10:A20 that return either a text

    >> "True"
    >> > > (not a boolean) or a blank "" .
    >> > >
    >> > > There are several "Trues" in the range but when I use -
    >> > >
    >> > > =Countif(A10:A20,"True")
    >> > >
    >> > > I get a result of 0.
    >> > >
    >> > > Why is this?
    >> > >
    >> > > Thanks
    >> > >
    >> > >
    >> > >

    >>
    >>
    >>




  34. #34
    Lookin for a job
    Guest

    Re: countif results

    Have a look see at this screencap -

    http://img177.imageshack.us/img177/9371/countif4tc.jpg

    It seems aparent to me that Countif doesn't like a text "True".

    I'm just wanting to know why.

    What's the difference between -

    =Countif(A10:A20,"apples")

    and

    =Countif(A10:A20,"True")

    Thanks

    "Anne Troy" wrote:

    > Okay. I think you'd better give us the exact formulas in your A10 to A20
    > 'cause I can't replicate the problem you're having. Works for me whether
    > "TRUE" or TRUE.
    >
    > *******************
    > ~Anne Troy
    >
    > www.OfficeArticles.com
    >
    >
    > "Lookin for a job" <[email protected]> wrote in
    > message news:[email protected]...
    > > That certainly will work but the Countif is more efficient.
    > >
    > > I changed the text true to the boolean TRUE.
    > >
    > > I really appreciate everyones help but can anyone answer the question as

    > to
    > > why -
    > >
    > > =Countif(A10:A20,"true")
    > >
    > > returns 0 ???
    > >
    > > Thanks
    > >
    > > "kk" wrote:
    > >
    > > > Try this
    > > >
    > > > =SUMPRODUCT(--(A10:A20="TRUE"))
    > > >
    > > > Does it help?
    > > >
    > > >
    > > > "Lookin for a job" <Lookin for a [email protected]> wrote in
    > > > message news:[email protected]...
    > > > Hello Guys..
    > > >
    > > > I have a range of IF formulas in A10:A20 that return either a text

    > "True"
    > > > (not a boolean) or a blank "" .
    > > >
    > > > There are several "Trues" in the range but when I use -
    > > >
    > > > =Countif(A10:A20,"True")
    > > >
    > > > I get a result of 0.
    > > >
    > > > Why is this?
    > > >
    > > > Thanks
    > > >
    > > >
    > > >

    >
    >
    >


  35. #35
    Lookin for a job
    Guest

    Re: countif results

    Hello Anne -

    That doesn't work as I had already tried that......still returns 0.

    What it is about True that causes this problem? In the IF formula when I
    change the text "True" to the boolean TRUE then use -

    =Countif(A10:A20,TRUE)

    I get the correct result.

    I guess I can use the boolean value but would still like to know why True
    doesn't get recognized ?????

    Thanks

    "Anne Troy" wrote:

    > "True" (in quotes) means literal text. The text isn't literal. Rather "true"
    > in this case is a value. So, you dont' need the quotes in your formula.
    >
    > =Countif(A10:A20,TRUE)
    > *******************
    > ~Anne Troy
    >
    > www.OfficeArticles.com
    >
    >
    > "Lookin for a job" <Lookin for a [email protected]> wrote in
    > message news:[email protected]...
    > > Hello Guys..
    > >
    > > I have a range of IF formulas in A10:A20 that return either a text "True"
    > > (not a boolean) or a blank "" .
    > >
    > > There are several "Trues" in the range but when I use -
    > >
    > > =Countif(A10:A20,"True")
    > >
    > > I get a result of 0.
    > >
    > > Why is this?
    > >
    > > Thanks

    >
    >
    >


  36. #36
    kk
    Guest

    Re: countif results

    Try this

    =SUMPRODUCT(--(A10:A20="TRUE"))

    Does it help?


    "Lookin for a job" <Lookin for a [email protected]> wrote in
    message news:[email protected]...
    Hello Guys..

    I have a range of IF formulas in A10:A20 that return either a text "True"
    (not a boolean) or a blank "" .

    There are several "Trues" in the range but when I use -

    =Countif(A10:A20,"True")

    I get a result of 0.

    Why is this?

    Thanks



  37. #37
    JE McGimpsey
    Guest

    Re: countif results

    Hmm... not for me (XL03/04).

    Using
    =COUNTIF(A10:A20,TRUE)

    or

    =COUNTIF(A10:A20,"TRUE")

    fails to count cells in A10:A20 containing Text "TRUE".

    OTOH this counted Text "TRUE" but not boolean TRUE:

    =COUNTIF(A10:A20,"TRUE*")




    In article <[email protected]>,
    "Anne Troy" <[email protected]> wrote:

    > Okay. I think you'd better give us the exact formulas in your A10 to A20
    > 'cause I can't replicate the problem you're having. Works for me whether
    > "TRUE" or TRUE.
    >


  38. #38
    Anne Troy
    Guest

    Re: countif results

    Okay. I think you'd better give us the exact formulas in your A10 to A20
    'cause I can't replicate the problem you're having. Works for me whether
    "TRUE" or TRUE.

    *******************
    ~Anne Troy

    www.OfficeArticles.com


    "Lookin for a job" <[email protected]> wrote in
    message news:[email protected]...
    > That certainly will work but the Countif is more efficient.
    >
    > I changed the text true to the boolean TRUE.
    >
    > I really appreciate everyones help but can anyone answer the question as

    to
    > why -
    >
    > =Countif(A10:A20,"true")
    >
    > returns 0 ???
    >
    > Thanks
    >
    > "kk" wrote:
    >
    > > Try this
    > >
    > > =SUMPRODUCT(--(A10:A20="TRUE"))
    > >
    > > Does it help?
    > >
    > >
    > > "Lookin for a job" <Lookin for a [email protected]> wrote in
    > > message news:[email protected]...
    > > Hello Guys..
    > >
    > > I have a range of IF formulas in A10:A20 that return either a text

    "True"
    > > (not a boolean) or a blank "" .
    > >
    > > There are several "Trues" in the range but when I use -
    > >
    > > =Countif(A10:A20,"True")
    > >
    > > I get a result of 0.
    > >
    > > Why is this?
    > >
    > > Thanks
    > >
    > >
    > >




  39. #39
    Peo Sjoblom
    Guest

    Re: countif results

    Why would you even type in true in an if formula? E.g.

    =IF(A1>2,"True","False")

    can be written

    =A1>2

    instead, there is no need to write true or false

    --
    Regards,

    Peo Sjoblom

    (No private emails please)


    "Lookin for a job" <[email protected]> wrote in
    message news:[email protected]...
    > Hello Anne -
    >
    > That doesn't work as I had already tried that......still returns 0.
    >
    > What it is about True that causes this problem? In the IF formula when I
    > change the text "True" to the boolean TRUE then use -
    >
    > =Countif(A10:A20,TRUE)
    >
    > I get the correct result.
    >
    > I guess I can use the boolean value but would still like to know why True
    > doesn't get recognized ?????
    >
    > Thanks
    >
    > "Anne Troy" wrote:
    >
    >> "True" (in quotes) means literal text. The text isn't literal. Rather
    >> "true"
    >> in this case is a value. So, you dont' need the quotes in your formula.
    >>
    >> =Countif(A10:A20,TRUE)
    >> *******************
    >> ~Anne Troy
    >>
    >> www.OfficeArticles.com
    >>
    >>
    >> "Lookin for a job" <Lookin for a [email protected]> wrote in
    >> message news:[email protected]...
    >> > Hello Guys..
    >> >
    >> > I have a range of IF formulas in A10:A20 that return either a text
    >> > "True"
    >> > (not a boolean) or a blank "" .
    >> >
    >> > There are several "Trues" in the range but when I use -
    >> >
    >> > =Countif(A10:A20,"True")
    >> >
    >> > I get a result of 0.
    >> >
    >> > Why is this?
    >> >
    >> > Thanks

    >>
    >>
    >>



  40. #40
    Lookin for a job
    Guest

    Re: countif results

    That certainly will work but the Countif is more efficient.

    I changed the text true to the boolean TRUE.

    I really appreciate everyones help but can anyone answer the question as to
    why -

    =Countif(A10:A20,"true")

    returns 0 ???

    Thanks

    "kk" wrote:

    > Try this
    >
    > =SUMPRODUCT(--(A10:A20="TRUE"))
    >
    > Does it help?
    >
    >
    > "Lookin for a job" <Lookin for a [email protected]> wrote in
    > message news:[email protected]...
    > Hello Guys..
    >
    > I have a range of IF formulas in A10:A20 that return either a text "True"
    > (not a boolean) or a blank "" .
    >
    > There are several "Trues" in the range but when I use -
    >
    > =Countif(A10:A20,"True")
    >
    > I get a result of 0.
    >
    > Why is this?
    >
    > Thanks
    >
    >
    >


  41. #41
    Lookin for a job
    Guest

    Re: countif results

    That works and I'm absolutely certain that the IF formula uses the text value
    "true" and not the boolen value TRUE and there are no extra chars in the
    cells.

    I really appreciate everyones input and suggestions but does anybody know
    WHY -

    =Countif(A10:20,"true")

    Thanks

    "KL" wrote:

    > Hi,
    >
    > Since you are pretty confident that True is text and not a logical value,
    > why don't you try something like this (just in case there is an extra space
    > o something):
    >
    > =COUNTIF(A10:A20,"*True*")
    >
    > Regards,
    > KL
    >
    >
    > "Lookin for a job" <[email protected]> wrote in
    > message news:[email protected]...
    > > Hello Anne -
    > >
    > > That doesn't work as I had already tried that......still returns 0.
    > >
    > > What it is about True that causes this problem? In the IF formula when I
    > > change the text "True" to the boolean TRUE then use -
    > >
    > > =Countif(A10:A20,TRUE)
    > >
    > > I get the correct result.
    > >
    > > I guess I can use the boolean value but would still like to know why True
    > > doesn't get recognized ?????
    > >
    > > Thanks
    > >
    > > "Anne Troy" wrote:
    > >
    > >> "True" (in quotes) means literal text. The text isn't literal. Rather
    > >> "true"
    > >> in this case is a value. So, you dont' need the quotes in your formula.
    > >>
    > >> =Countif(A10:A20,TRUE)
    > >> *******************
    > >> ~Anne Troy
    > >>
    > >> www.OfficeArticles.com
    > >>
    > >>
    > >> "Lookin for a job" <Lookin for a [email protected]> wrote in
    > >> message news:[email protected]...
    > >> > Hello Guys..
    > >> >
    > >> > I have a range of IF formulas in A10:A20 that return either a text
    > >> > "True"
    > >> > (not a boolean) or a blank "" .
    > >> >
    > >> > There are several "Trues" in the range but when I use -
    > >> >
    > >> > =Countif(A10:A20,"True")
    > >> >
    > >> > I get a result of 0.
    > >> >
    > >> > Why is this?
    > >> >
    > >> > Thanks
    > >>
    > >>
    > >>

    >
    >
    >


  42. #42
    Lookin for a job
    Guest

    Re: countif results

    > =IF(A1>2,"True","False")
    >
    > can be written
    >
    > =A1>2


    Yes it can but I don't want a FALSE return. I want "".

    I can use the boolean TRUE -

    =IF(A1>2,True,"")

    But why doesn't "true" get recognized?

    What's the difference between "apples" and "true" in a Countif?

    Seems to me there is none ???

    Thanks

    "Peo Sjoblom" wrote:

    > Why would you even type in true in an if formula? E.g.
    >
    > =IF(A1>2,"True","False")
    >
    > can be written
    >
    > =A1>2
    >
    > instead, there is no need to write true or false
    >
    > --
    > Regards,
    >
    > Peo Sjoblom
    >
    > (No private emails please)
    >
    >
    > "Lookin for a job" <[email protected]> wrote in
    > message news:[email protected]...
    > > Hello Anne -
    > >
    > > That doesn't work as I had already tried that......still returns 0.
    > >
    > > What it is about True that causes this problem? In the IF formula when I
    > > change the text "True" to the boolean TRUE then use -
    > >
    > > =Countif(A10:A20,TRUE)
    > >
    > > I get the correct result.
    > >
    > > I guess I can use the boolean value but would still like to know why True
    > > doesn't get recognized ?????
    > >
    > > Thanks
    > >
    > > "Anne Troy" wrote:
    > >
    > >> "True" (in quotes) means literal text. The text isn't literal. Rather
    > >> "true"
    > >> in this case is a value. So, you dont' need the quotes in your formula.
    > >>
    > >> =Countif(A10:A20,TRUE)
    > >> *******************
    > >> ~Anne Troy
    > >>
    > >> www.OfficeArticles.com
    > >>
    > >>
    > >> "Lookin for a job" <Lookin for a [email protected]> wrote in
    > >> message news:[email protected]...
    > >> > Hello Guys..
    > >> >
    > >> > I have a range of IF formulas in A10:A20 that return either a text
    > >> > "True"
    > >> > (not a boolean) or a blank "" .
    > >> >
    > >> > There are several "Trues" in the range but when I use -
    > >> >
    > >> > =Countif(A10:A20,"True")
    > >> >
    > >> > I get a result of 0.
    > >> >
    > >> > Why is this?
    > >> >
    > >> > Thanks
    > >>
    > >>
    > >>

    >
    >


  43. #43
    KL
    Guest

    Re: countif results

    Hi,

    Since you are pretty confident that True is text and not a logical value,
    why don't you try something like this (just in case there is an extra space
    o something):

    =COUNTIF(A10:A20,"*True*")

    Regards,
    KL


    "Lookin for a job" <[email protected]> wrote in
    message news:[email protected]...
    > Hello Anne -
    >
    > That doesn't work as I had already tried that......still returns 0.
    >
    > What it is about True that causes this problem? In the IF formula when I
    > change the text "True" to the boolean TRUE then use -
    >
    > =Countif(A10:A20,TRUE)
    >
    > I get the correct result.
    >
    > I guess I can use the boolean value but would still like to know why True
    > doesn't get recognized ?????
    >
    > Thanks
    >
    > "Anne Troy" wrote:
    >
    >> "True" (in quotes) means literal text. The text isn't literal. Rather
    >> "true"
    >> in this case is a value. So, you dont' need the quotes in your formula.
    >>
    >> =Countif(A10:A20,TRUE)
    >> *******************
    >> ~Anne Troy
    >>
    >> www.OfficeArticles.com
    >>
    >>
    >> "Lookin for a job" <Lookin for a [email protected]> wrote in
    >> message news:[email protected]...
    >> > Hello Guys..
    >> >
    >> > I have a range of IF formulas in A10:A20 that return either a text
    >> > "True"
    >> > (not a boolean) or a blank "" .
    >> >
    >> > There are several "Trues" in the range but when I use -
    >> >
    >> > =Countif(A10:A20,"True")
    >> >
    >> > I get a result of 0.
    >> >
    >> > Why is this?
    >> >
    >> > Thanks

    >>
    >>
    >>




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1