count occurrences with two criteria

lynnrudolph

New Member
Joined
Jul 20, 2010
Messages
15
I have some simple text data (5 columns that include disease and country), say A-E and 1000 rows, where cols B & C are disease and country, respectively. I need to count how many occurrences of TB are in Chad for example, in a separate cell. Any help would be appreciated. Thank you! Oh and it must be compatible with Excel 97 as I am using an ancient version at the moment.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Sounds like you want a pivot table. They aren't to complex but a bit tricky to explain in a simple way.

This has a guide.
http://www.ozgrid.com/Excel/excel-pivot-tables.htm

But as a rough idea these are the steps. (I don't have 97 so from memory im afraid)

Highlight all of the data you want to pivot.
press insert on the menu bar, then pivot table
Press use current selection and then next
press wizard (if its not already open)
Drag the column name on the left onto the field map on the right (in your case Col B on the Row & col C on the Column. Then put Col B in the data)

Press finish.

Its just a rough idea but it should get you start. Maybe someone has 97 and can be more acurate with some instructions.
 
Upvote 0
I have some simple text data (5 columns that include disease and country), say A-E and 1000 rows, where cols B & C are disease and country, respectively. I need to count how many occurrences of TB are in Chad for example, in a separate cell. Any help would be appreciated. Thank you! Oh and it must be compatible with Excel 97 as I am using an ancient version at the moment.

Try...

K2: TB

L2: Chad

M2:

=SUMPRODUCT(--($B$2:$B$1000=K2),--($C$2:$C$2000=L2))
 
Upvote 0
I hope this reply works...not sure if I'm doing it right. Unfortunately, I can't do a pivot table because I'm actually not doing this in Excel 97, but Excel 2010, then saving backwards to 97 version so it can be used by my friend in another country. And I'm not good enough in 2010 to do a proper pivot table that I can be sure will work in the earlier version. So I was looking for just a formula. Sorry, I should have stated that in the original question. Otherwise, a pivot table would have been perfect.
 
Upvote 0
I hope this reply works...not sure if I'm doing it right. Unfortunately, I can't do a pivot table because I'm actually not doing this in Excel 97, but Excel 2010, then saving backwards to 97 version so it can be used by my friend in another country. And I'm not good enough in 2010 to do a proper pivot table that I can be sure will work in the earlier version. So I was looking for just a formula. Sorry, I should have stated that in the original question. Otherwise, a pivot table would have been perfect.

Post #3 offers you a formula...
 
Upvote 0

Forum statistics

Threads
1,224,574
Messages
6,179,626
Members
452,933
Latest member
patv

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