Formula for counting with two criteria, name and counting for baseball stats

elketa1252

New Member
Joined
May 19, 2017
Messages
16
Guys,

I have a baseball team and would like a formula to keep the stats. For example, I would like a formula in Cell F3 that counts how many 1b(from Cell F2) does Salvador Martinez(Cell B3) has in the range B33:F:40. So this formula would need to match B3 and find the rows where Salvador Martinez is and add all the 1b. The return would be 3, the ones in yellow. I would use the formula for the other players and for the different stats found in ranges F:2N2. Just to throw another example, these are in red for Jose Perez HR, Cell I7, this formula would return 2 here. Any help would be much appreciated. I have tried all types of formula, index match sumproduct and just cannot do it. Sorry for my english, it's my second language.

Thank you. And I tried upload a picture but it's asking me for an URL instead of uploading from my computer.


B C D E F G H I J K L M N O P Q R S
[TABLE="width: 783"]
<tbody>[TR]
[TD]2 Name[/TD]
[TD]PA[/TD]
[TD]AB[/TD]
[TD]H[/TD]
[TD]1b[/TD]
[TD]2b[/TD]
[TD]3b[/TD]
[TD]HR[/TD]
[TD]ROE[/TD]
[TD]SACf[/TD]
[TD]BB[/TD]
[TD]GDP[/TD]
[TD]Ks[/TD]
[TD]RBI[/TD]
[TD]RUNS[/TD]
[TD]BA[/TD]
[TD]OB%[/TD]
[TD]Slug%[/TD]
[/TR]
[TR]
[TD]3 Salvador Martinez[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]#N/A[/TD]
[TD]#N/A[/TD]
[TD]#N/A[/TD]
[/TR]
[TR]
[TD]4 Miguel Rosario[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0[/TD]
[TD]0.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][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][TABLE="width: 314"]
<tbody>[TR]
[TD]33 Salvador Martinez[/TD]
[TD]2b[/TD]
[TD]1b[/TD]
[TD]2b[/TD]
[TD]hr[/TD]
[/TR]
[TR]
[TD]34 Yoel Martinez[/TD]
[TD]2b[/TD]
[TD]hr[/TD]
[TD]2b[/TD]
[TD]1b[/TD]
[/TR]
[TR]
[TD]35 Jose Perez[/TD]
[TD]2b[/TD]
[TD]1b[/TD]
[TD]hr[/TD]
[TD]hr[/TD]
[/TR]
[TR]
[TD]36 Miguel Rosario[/TD]
[TD]hr[/TD]
[TD]2b[/TD]
[TD]3b[/TD]
[TD]3b[/TD]
[/TR]
[TR]
[TD]37 Frank Guzman[/TD]
[TD]1b[/TD]
[TD]2b[/TD]
[TD]3b[/TD]
[TD]2b[/TD]
[/TR]
[TR]
[TD]38 Salvador Martinez[/TD]
[TD]3b[/TD]
[TD]2b[/TD]
[TD]3b[/TD]
[TD]3b[/TD]
[/TR]
[TR]
[TD]39 Galindo Gomez[/TD]
[TD]2b[/TD]
[TD]3b[/TD]
[TD]3b[/TD]
[TD]2b[/TD]
[/TR]
[TR]
[TD]40 Salvador Martinez[/TD]
[TD]2b[/TD]
[TD]1b[/TD]
[TD]1b[/TD]
[TD]hr[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Ok got it everybodyyy. Thanks you. I had mispelled Salvador so that's why it wouldn't match. Oh lord thank you all sorry for everything. So embarassed
 
Last edited:
Upvote 0
The formula in B2 (first example) will return a 0 because there aren't any PAs found. Then, drag the formula in B2 across as well as down and the other sums will be calculated.
 
Upvote 0
The formula in B2 (first example) will return a 0 because there aren't any PAs found. Then, drag the formula in B2 across as well as down and the other sums will be calculated.

Thank you. I had mispelled so it couldn't find the match. So embarrased for wasting all of you your time. Thank you all for the help.
 
Upvote 0
No need to be embarrassed, we've all been there.The main thing is it's working.

Thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,882
Messages
6,175,164
Members
452,615
Latest member
bogeys2birdies

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