G Guest Sep 20, 2007 #2 Sure. If x is in A1 and y is in B1 then: =(A1>0)*((B1>0)+(B1<0)*2)+(A1<0)*((B1>0)*4+(B1<0)*3)