Counting in two columns

  • Thread starter Thread starter MrSmith
  • Start date Start date
M

MrSmith

Hey All,

I'm not sure how to explain this so I'm going to do a little diagram.

Number | Material
----------------------
2 | Granite
1 | Marble
3 | Marble
5 | Granite

This is the data that the user enters into a spreadsheet. What I would
like to do is have a summery at the bottom of the spreadsheet with the
TOTAL number of Granite and Marble slabs entered.
I've looked at using COUNTIF for the "Material" column but I need to
take the "Number" column into account.

Any help would be greatly appreciated.
-Mark.
 
Hi

Try using SUMPRODUCT.

=SUMPRODUCT((rangeB="Granite")*(rangeA))
where rangeA is your Number range and rangeB is your Material range

Andy.
 
Back
Top