View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
CT CT is offline
external usenet poster
 
Posts: 9
Default IF/AND Formula Problem

I want to thank you all (T.Valko, Max, Rick and David) for your quick
responses and explanations to my problem. Rick, I should be topping out at 6
conditions so hopefully will not have to worry about the 7th. David, thank
you for expanding the logic.

"David Biddulph" wrote:

You have satisfied the 2nd condition
If B10 and C1="Yes" return "SPINS TOL" in A1, so that's what you've got,
and tyou don't go on to do the 3rd test.

If you want to have the 3rd condition
If B1="-" and C1="Yes" return "TOL" in A1
take priority over the 2nd condition
If B10 and C1="Yes" return "SPINS TOL" in A1
then reverse the order of the tests.

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

"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?