# Adding up totals based on criteria from another column

1. ## Adding up totals based on criteria from another column

In my attached worksheet, I have a sheet with a list of players, their position, and their projected stats for the upcoming season.

I'm trying to have the totals of Columns I:R add up in row 44 based on the position listed in column B.

For the gold cells hitting, I would only like it to add to the totals in cells I44:M44 if one of the following positions (C,1B,2B,SS,3B,INF,CI,MI,OF,LF,CF,RF,DH,UTIL) is listed next to the players name. Also, for the blue cells pitching, I would only like it to add to the totals in cells N44:R44 if one of the following positions (SP,RP,P) is listed next to the players name.

The positions listed in column B will always be changing depending on the amount of players for each team so I need the formula to apply all the way down to row 43 even though there are no players listed in rows 30 to 43 currently.

Please let me know if there are any questions, thanks very much!

2. ## Re: Adding up totals based on criteria from another column

Hello,

Try in I44 and copy to M44.

=SUM(SUMIF(\$B4:\$B43,{"C","1B","2B","SS","3B","INF","CI","MI","OF","LF","CF","RF","DH","UTIL"},I\$4:I\$43))

N44 and copy to R44

=SUM(SUMIF(\$B4:\$B43,{"SP","RP","P"},N\$4:N\$43))

3. ## Re: Adding up totals based on criteria from another column

Originally Posted by Haseeb A
Hello,

Try in I44 and copy to M44.

=SUM(SUMIF(\$B4:\$B43,{"C","1B","2B","SS","3B","INF","CI","MI","OF","LF","CF","RF","DH","UTIL"},I\$4:I\$43))

N44 and copy to R44

=SUM(SUMIF(\$B4:\$B43,{"SP","RP","P"},N\$4:N\$43))
100% perfect, thanks a bunch!

4. ## Re: Adding up totals based on criteria from another column

Or this...
=SUMPRODUCT((\$B\$4:\$B\$43={"C","1B","2B","SS","3B","INF","CI","MI","OF","LF","CF","RF","DH","UTIL"})*(I\$4:I\$43))

Note you have a space (or something) in most of those cells, you need to remove that

5. ## Re: Adding up totals based on criteria from another column

Originally Posted by FDibbins
Or this...
=SUMPRODUCT((\$B\$4:\$B\$43={"C","1B","2B","SS","3B","INF","CI","MI","OF","LF","CF","RF","DH","UTIL"})*(I\$4:I\$43))

Note you have a space (or something) in most of those cells, you need to remove that
Thank you very much

6. ## Re: Adding up totals based on criteria from another column

Happy to help, thanks for the feedback

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1