Problem counting data...not sure wich formula to use...

BishopZ

New Member
Joined
Jan 28, 2004
Messages
2
I am having a big problem with trying to count some data. I have two colums, one contains names and the other contains items. (I couldn't get the HTML add-in to work properly so you will have to bear with me)

Example:

..A..................B
John.............Apple
Jim..............Orange
John............Orange
Bill...............Apple
John.............Apple
Jim..............Orange

I need a formula that can tell me how many apples and oranges one person has:

..A......................B.........................C
.......................Apples................Oranges
Bill......................1.........................0
Jim.....................0.........................2
John...................2 .........................1


I have tried a few differnt ways with no luck... I just want it to look in column A for John's name and when it finds it I need it to count if there is an apple. They way I have my table set up is I only need each column to look for one thing, if it sees "apple" count 1 if not then 0... There would be another formula for the "oranges" to do the same thing.


Hope this makes sense and someone might have some suggestions.

Thanks
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
If I understood correctly (which is rare),
Book2
ABCD
1Namefruit
2JohnApple
3JimOrange
4JohnOrange
5BillApple
6JohnApple
7JimOrange
8
9AppleOrange
10John21
11Jim02
12Bill10
Sheet1
 
Upvote 0
Could you use a PivotTable?
Book5
ABCD
1PersonFruit
2JohnApple
3JimOrange
4JohnOrange
5BillApple
6JohnApple
7JimOrange
8JohnGrape
9JimOrange
10JohnOrange
11BillBanana
12JohnApple
13JimOrange
14JohnApple
15JimOrange
16JohnOrange
17BillBanana
18JohnBanana
19JimOrange
Sheet2
Book5
ABCDEF
3CountofFruitFruit
4PersonAppleBananaGrapeOrangeGrandTotal
5Bill123
6Jim66
7John41139
8GrandTotal531918
Sheet4
 
Upvote 0
Try e.g. SUMPRODUCT:
Book2
ABCDEF
1ABApplesOranges
2JohnAppleJohn21
3JimOrangeJim02
4JohnOrangeBill10
5BillApple
6JohnApple
7JimOrange
Sheet3

Martin
 
Upvote 0
I have never gotten into Pivot tables before... But I will look into it now... at least I may learn something new :)
 
Upvote 0

Forum statistics

Threads
1,203,527
Messages
6,055,926
Members
444,835
Latest member
Jonaskr

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