Windows Vista

If number in cell A1= 1 and cell A2= 1,

if A1 is greater than A2, return, 3

if A1=A2 and is 1 or greater, return, 2

if A1=A2 and is less than, return, 1

if not return, 0

*therefore value in a3 should be two*

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>

If Number in A1=2 A2= 1

*therefore value in a3 should be 3*

If Number in A1=0 A2= 0

*therefore value in a3 should be 1*

If Number in A1=1 A2= 2

*therefore value in a3 should be 0*

Using =if(ISBLANK(a1),0,IF(a1>a2,3,IF(a1,1,0)))

but can't workout how to add if A1=A2 and is 1 or greater, return, 2

Any help greatly appreciated.

Thanks

Pat