Count empty cells with a specific term

  • Thread starter Thread starter FreddieP
  • Start date Start date
F

FreddieP

Hi I want to count the number of empty cells in column d if column a=x


what formula should I use then?
 
All seem to give the same ans.
=SUMPRODUCT((a2:a22="x")*(TRIM(d2:d22)=""))
=SUMPRODUCT(--(a2:a22="x")*--(TRIM(d2:d22)=""))
=SUMPRODUCT(--(a2:a22="x"),--(TRIM(d2:d22)=""))
 
The extra double unary minuses won't do any harm.

=SUMPRODUCT(--(a2:a22="x")*--(TRIM(d2:d22)=""))
is the same as saying
=SUMPRODUCT(-1*-1*(a2:a22="x")*-1*-1*(TRIM(d2:d22)=""))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top