Sumif

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

A B
1 500 L-Truck
2 200 L-Car
3 150 T-Car
4 100 T-Truck
5 400 T-Truck

Using Sumif, is it possible to sum up only Car & Only Truck

I would like to see a total for Car as 350 & Truck 1000
 
One way is to use SUMPRODUCT ..

Assume data in cols A and B, from row2 to row10 (say)

Enter
In D2: Car
In D3: Truck

Then place in E2:
=SUMPRODUCT(--ISNUMBER(SEARCH(D2,$B$2:$B$10)),$A$2:$A$10)
Copy E2 down

Adapt the ranges to suit, but note that we can't use entire col references
in SUMPRODUCT, unlike SUMIF
 

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

Back
Top