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
2 NamePAABH1b2b3bHRROESACfBBGDPKsRBIRUNSBAOB%Slug%
3 Salvador Martinez00000000000000#N/A#N/A#N/A
4 Miguel Rosario000000000000000.0000.0000.000
5 Frank Guzman000000000000000.0000.0000.000
6 Galindo Gomez000000000000000.0000.0000.000
7 Jose Perez000000000000000.0000.0000.000
33 Salvador Martinez2b1b2bhr
34 Yoel Martinez2bhr2b1b
35 Jose Perez2b1bhrhr
36 Miguel Rosariohr2b3b3b
37 Frank Guzman1b2b3b2b
38 Salvador Martinez3b2b3b3b
39 Galindo Gomez2b3b3b2b
40 Salvador Martinez2b1b1bhr

<tbody>
</tbody>

<tbody>
</tbody>
 
Automatic is indeed correct.
 
Upvote 0

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
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,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

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