I started programming just a few weeks ago, got a grasp on the concepts and been evolving on it, since I have certain activities with spreadsheets, I decided to take it to the next level and got stuck on how to make a formula.I'm manually gathering all the data and I need to keep it as it is, since it's important for the analysis to know if a team is playing at home or not.Right now, I have something like this it would be A1, B1, C1 and D1. For example:  | Newcastle | 1 | 2 | Liverpool I'm analyzing one club at time. So I need to know if the team on A1 or D1 is the team that I'm analyzing, then I need it to check how many points this team got from the match, so it needs to recognize what the result on B1/C1 is, and which team owns the result. The team on A1 owns the result on B1, and the team on D1 owns the result on C1.I hope it's enough to enlight whoever can help me. Maybe there are better functions to use than IF like I said in the title, if you can point it out, it would be also great. Right now I'm trying to work with nested IF functions.
Using if (or other function) to recognize a string and sum values
google spreadsheets;formulas
Please try:  =if(B1=C1;1;if(B1>C1;0;3)) IF the team to be analysed is in F1 then in E1 and copied down:  if(and(F$1=A1,B1>C1),3,if(and(or(F$1=A1,F$1=D1),C1=B1),1,if(and(F$1=D1,C1>B1),3,if(and(F$1=A1,B1>C1),3,0))))  might suit. It is the nature of spreadsheets that locations (cell references) are very significant and with the limited information in the question difficult to optimise what appears an ugly formula. 