View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default IF/AND Formula Problem

The problem is that:

If B10 and C1="Yes" return "SPINS TOL" in A1.
If B1="-" and C1="Yes" return "TOL" in A1


When B = "-", that evaluates to be 0 and in your formula this test gets
satisfied first so it never gets to If B1="-" and C1="Yes" return "TOL" in
A1.

So, try this:

=IF(AND(B1="-",C1="-"),"No Match",IF(AND(ISNUMBER(B1),B10,C1="Yes"),"SPINS
TOL",IF(AND(B1="-",C1="Yes"),"TOL",IF(AND(ISNUMBER(B1),B10,C1= "-"),"SPINS"))))



--
Biff
Microsoft Excel MVP


"CT" wrote in message
...
In column A I need to return a value based on critera found in columns B
and C.
If B1="-" and C1="-" return "No Match" in A1.
If B10 and C1="Yes" return "SPINS TOL" in A1.
If B1="-" and C1="Yes" return "TOL" in A1
If B10 and C1="-" return "SPINS" in A1.

Here is the formula I am using now.
=IF(AND(B1="-",C1="-"),"No Match",IF(AND(B10,C1="Yes"),"SPINS
TOL",IF(AND(B1="-",C1="Yes"),"TOL",IF(AND(B10,C1="-"),"SPINS"))))

Here are my results:
A B C
1 No Match - -
2 SPINS TOL 1 Yes
3 SPINS TOL - Yes
4 SPINS 2 -

I cannot get it to return "TOL" in A3. What am I doing wrong?