Count cells based on multiple criteria

mhartman09

New Member
Joined
Aug 31, 2010
Messages
25
I've been working on this for a while now and can't figure out how to get the desired result. I'll try to explain as best I can....<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
<o:p></o:p>
I've got a spreadsheet used to track items given out by our salesmen. Row 1 contains column headers, column A lists the sales reps and column C lists items given out to certain customers. Here's a screenshot of a simplified version of my information:
<o:p></o:p>
<o:p></o:p>
<o:p></o:p>
<o:p>
list-1.jpg
</o:p>
<o:p></o:p>
<o:p>On a separate tab I'm trying to get totals broken down by sales rep and item type as shown:</o:p>
<o:p></o:p>
<o:p></o:p>
<o:p>
TOTALS.jpg
</o:p>
<o:p></o:p>
<o:p></o:p>
<o:p>I don't know what formula to use to calculate a total using two columns of criteria. I'm really stumped considering the "Items" column contains multiple items. I'd appreciate any help anyone can offer.</o:p>
 
I'm currently using this formula =SUMPRODUCT((ISNUMBER(SEARCH(J$2,Sheet1!$F:$F)))*(ISNUMBER(SEARCH($B3,Sheet1!$J:$J)))

This formula finds each occurrence where both a particular salesman (J2 is the cell containing the salesman name) is giving out a particular gift (B3 is the cell containing the name of the gift). The column on Sheet1 containing gifts (column J) sometimes has more than one gift listed in a cell. This formula is counting every occurrence, including those with multiple gifts in the same cell.

Would the =COUNTIFS formula be able to count out the gifts in cells containing more than just one gift? I was under the impression that formula would only count the cells in the gift column (column J) containing only an exact match, meaning just a single gift listed.
 
Upvote 0

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Forum statistics

Threads
1,225,149
Messages
6,183,179
Members
453,151
Latest member
Lizamaison

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top