Sum with multiple criteria

D-Angle

New Member
Joined
Aug 24, 2011
Messages
23
I am trying to get my soccer stats spreadsheet to do some complicated adding up for me and not getting anywhere fast. I have the following spreadsheet with the season's game results so far, set up so I can copy and paste them straight from England - Premier League to update the totals on the right and bottom. A separate tab has the current league table, which updates the number of games played on the left, and the league position on the left and across the top.

Excel 2012
ABCDEFGHIJKLMNOPQRSTUVWXY
1Games playedLge Pos.4139216718141361510122019581117Goals scored at homeGoals conceded at home
2 Arsenal Bournemouth Burnley Chelsea Crystal Palace Everton Hull City Leicester City Liverpool Manchester City Manchester Utd Middlesbrough Southampton Stoke City Sunderland Swansea City Tottenham Watford West Bromwich West Ham Utd
3114 Arsenal3-03-40-02-13-21-1128
41113 Bournemouth1-06-11-31-20-01-0106
5119 Burnley0-13-22-11-12-00-12-0106
6112 Chelsea3-05-03-01-24-02-1183
71116 Crystal Palace1-12-44-10-10-178
8117 Everton1-13-11-01-12-083
91118 Hull City1-40-22-10-12-10-2511
101114 Leicester City0-03-03-10-02-11-294
11111 Liverpool5-14-10-06-12-1174
12113 Manchester City4-01-11-11-12-13-1125
13116 Manchester Utd0-04-11-22-01-184
141115 Middlesbrough2-01-21-11-20-156
151110 Southampton3-10-21-11-01-165
161112 Stoke City1-42-03-10-41-1710
171120 Sunderland1-42-30-31-21-1513
181119 Swansea City2-20-21-21-31-30-0512
19115 Tottenham1-01-11-12-01-062
20118 Watford1-32-21-21-03-188
211111 West Bromwich1-20-40-01-14-269
221117 West Ham Utd1-01-10-31-11-02-469
23Goals Scored Away
2412318975413138566459765
25Goals Conceded Away
263109611101314105967889411611

<tbody>
</tbody>
Sheet1
I have used formulas to sum the first or last digit in a group of cells to get the total goals scored/conceded at home and away, for example Arsenal's total goals scored at home is calculated by {=SUM(IF(ISNUMBER(LEFT(D3:W3,1)+0),LEFT(D3:W3,1)+0))}. The next thing I want to work out is goals scored/conceded using the teams' league positions as criteria, but I can't think how to narrow down the criteria in this way. Here's what I have tried to get it to work out with no success:
  • Total number of games played against a team currently in a higher league position (home and away)
  • Total number of games played against a team currently in a lower league position (home and away)
  • Total number of goals scored against a team currently in a higher league position (home and away)
  • Total number of goals scored against a team currently in a lower league position (home and away)
  • Total number of goals conceded against a team currently in a higher league position (home and away)
  • Total number of goals conceded against a team currently in a lower league position (home and away

Any ideas of where to start greatly appreciated. :)
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
I have been thinking on this overnight and think I have the logic of the formula, I just can't get the formula itself.

So, for example if working out the number of goals Arsenal have scored at home against a team in a higher league position; you would need to count the leftmost digit in all cells in the range D3:W3, as I have done in X3, but with the added criteria of only counting cells in the columns where the number in the range D1:W1 was less than the number in B3.

Does that make sense? Brain hurting now.:eek:
 
Upvote 0

Forum statistics

Threads
1,214,529
Messages
6,120,070
Members
448,943
Latest member
sharmarick

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