Function Conflicts with an If/Then Statement
I am trying to finalize a spreadsheet I have developed, but am having trouble with one of the final cell functions. The function is to compare two cells. Each cell will have a 0, 1 or 2. If the cells are identical then a 0 should appear in a third cell. If one cell is a 0 and the other is a 1 or 2 then a 1 should appear in the third cell. If one cell is a 1 and the other is a 2 then a 0 should appear in a third cell. This is what i would like, but don't know how to write as one cell function:
"If A2 is equal to 0 and A72 is equal to 0 then 0
If A2 is greater than 0 and A72 is greater than 0 then 0
If A2 is equal to 0 and A72 is greater than 0 then 1
If A2 is greater than 0 and A72 is equal to 0 then 1"
the problem is I can't seem to get it right. I always have a conflict where the program says something is false when it is true or true when it is false.
Here is what I have written:
=IF(A2=A72,0)+IF(A20+A720,0)+IF(A2=0+A720,1)+IF (A20+A72=0,1)
Thanks if you have any suggestions
Marshall
|