I have a huge list of matches between clubs and I want to calculate the goals for and the goals against.
I could find a way to calculate the goals for, using:
=SUMIF (A35:A46, "Liverpool", B35:B46) + SUMIF(D35:D46, "Liverpool", C35:C46)
The team being calculated the number of goals is organized like
Newcaste United 1 2 Liverpool
(where Newcastle is
A1, NewcastleGoals is
C1 and Liverpool,
What I need is to find a function that is opposed to
SUMIF so I can calculate the goals against Liverpool like
SUMIF, instead of collecting the result cell by cell with the sum function.
Basically, the logic would be like the first example, but ignoring "Liverpool" and calculating all of the other strings:
=SUMIF (A1:A38, if not Liverpool, B1:B38) + SUMIF(D1:D38, if not Liverpool, C1:C38)