View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Teethless mama Teethless mama is offline
external usenet poster
 
Posts: 3,718
Default Countif worksheet function frustrations

{=COUNT(IF((mhc.lease.no=F17)*(mhc.dept="DOTAG"),m hc.lease.no))}

For this model, you have to use COUNTA instead of COUNT



"Santa-D" wrote:

I've got a worksheet that uses the following countif function:

{=COUNT(IF((bay.cost.1=B97)*(dept.1="DOTAG"),bay.c ost.1))}

and it works, B97 is a currency value.

In another worksheet I have

{=COUNT(IF((mhc.lease.no=F17)*(mhc.dept="DOTAG"),m hc.lease.no))}

Where F17 is a text field, but the second one doesn't work.

However, this works instead

{=SUM(IF((mhc.lease.no=F17)*(mhc.dept="DCS"),1,0)) }

Is there any reason why the first countif works but not the second?