SUMIF help!

L

louncov

G'day,

I'm familiar with the SUMIF calculation...

A B
1 Peaches 5
2 Pears 10
3 Apples 15
4 Oranges 20
5 Bananas 25

SUMIF(A1:A5,A1,B1:B5) would give me '5', as would
SUMIF(A1:A5,"Peaches",B1:B5). My problem is if I want to know
'Peaches' & 'Pears', something like...

SUMIF(A1:A5,"Pea*",B1:B5)

I know this wouldn't work, as it would search for Pea*, but you get
the idea. I'd be looking for a '15'. Text string variables?

Thanks to all,
Cov.
 
L

Leo Heuser

Or

=SUMPRODUCT((A1:A5={"pears","peaches"})*(B1:B5))

--
Best Regards
Leo Heuser
MVP Excel

Followup to newsgroup only please.
 
A

Andy B

Leo

That doesn't work for me!! (XL2K)

Andy
Leo Heuser said:
Or

=SUMPRODUCT((A1:A5={"pears","peaches"})*(B1:B5))

--
Best Regards
Leo Heuser
MVP Excel

Followup to newsgroup only please.
 

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