Thread: Complex If
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Complex If

As-is, I don't see anything wrong with your expressions. If its not working
as expected, it could be your data quality, ie the text contains extraneous
white spaces throwing things off. Try wrapping TRIM around U2 and E2, eg:
=IF(AND(TRIM(U2)="YES",OR(TRIM(E2)<"Not-applicable",TRIM(E2)<"Red")),"Yes","")
--
Max
Singapore
---
"PAL" wrote:
I had to change it around a bit.

=IF(AND(U2="YES",OR(E2<"Not-applicable",E2<"Red")),"Yes","").

It seems to only be recognizing the U2, piece not the OR. Ideas.

"Max" wrote:

Try: =IF(AND(U2="YES",OR(E2="Not-applicable",E2="Red")),"Yes","")
It was just a parens thingy. High five? hit the YES below
--
Max
Singapore
---
"PAL" wrote:
Any ideas where I went wrong here. Can't leave the cell

=IF(AND(U2="YES",OR(E2="Not-applicable",E2="Red"),"Yes",""))