Sumproduct with Gaps

J

JimS

I tried using this formula:

=SUMPRODUCT(--(R25:R3000="o")*(S25:S3000="w"))

The problem is that there are gaps and blank cells down through the
spreadsheet.

How can I count the number of times "o" corresponds with "w" when
there are blank cells in the spread sheet?
 
P

Pete_UK

Try this:

=SUMPRODUCT((R25:R3000="o")*(S25:S3000="w")*(R25:R3000<>"")*
(S25:S3000<>""))

Hope this helps.

Pete
 
D

Dave Peterson

Use that formula. It'll ignore the empty cells--since the those empty cells
won't equal o or w.
 
D

Dave Peterson

ps.

The -- aren't needed in your formula. They're used to coerce True/falses to
1/0's. And the multiplication (*) does that fine.

so either:
=SUMPRODUCT((R25:R3000="o")*(S25:S3000="w"))
or
=SUMPRODUCT(--(R25:R3000="o"),--(S25:S3000="w"))
 

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

Top