View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default COUNTIF on result of formula

=SUMPRODUCT(--(LEFT(H2:H22,5)="hello"))

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Joe M." wrote in message
...
I am trying to use COUNTIF to count the occurance of a text within a range
of
cells which contains the results of a formula. Here is a simple example:

=COUNTIF(A1:A10,"HELLO")

A B
1 =LEFT(B1,FIND("X",B1)-1) HELLOXTHERE
2 =LEFT(B2,FIND("X",B2)-1) HELLOXGOODBYE
3 =LEFT(B3,FIND("X",B3)-1) HELLOXEVERYONE

This is a simplified example. the COUNTIF result should be 3 but is zero.
If
this is because the range is a result of a formula then how do I use
COUNTIF
on the formula result in A1:A10?

Thanks
Joe M.