View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Epinn Epinn is offline
external usenet poster
 
Posts: 605
Default TRUE - Boolean vs. Text

Biff,

Thanks for your response.

When I said "the only way" my emphasis wasn't on COUNTIF but on "*true" and TRUE. I was wondering if checking both was the only way. I was hoping that I could write out "true" in some way *once* and I could catch both logical and text. I guess not.

I didn't know that only COUNTIF requires the wildcard and SUMPRODUCT was okay without it. Very strange.

=SUMPRODUCT(--(A1:A6="true"))+SUMPRODUCT(--(A1:A6=TRUE))

Thanks for telling me about #N/A. I have no problem using COUNTIF for #N/A but I have a problem using SUMPRODUCT.

=SUMPRODUCT(--(B1:B6=#N/A)) returns #N/A
=SUMPRODUCT(--(B1:B6="#N/A")) returns #N/A

Unlike "true" or TRUE, neither one of the above two formulae for #N/A works. Will stick with COUNTIF.

Any suggestion? No guarantee required.

Epinn

"Epinn" wrote in message ...
Biff or anyone,

Is this the only way to count both text "true" and logical TRUE?

=COUNTIF(A1:A10,"*true")+COUNTIF(A1:A10,"true")

Thanks.

Epinn