Prev: Weeknum formula
Next: Excel 2007 - Personal Macros
From: PAL on 5 Apr 2010 11:26 Any ideas where I went wrong here. Can't leave the cell =IF(AND(U2="YES",OR(E2="Not-applicable",E2="Red"),"Yes",""))
From: Dave Peterson on 5 Apr 2010 11:33 Misplaced ) paren: =IF(AND(U2="YES",OR(E2="Not-applicable",E2="Red")),"Yes","") 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","")) -- Dave Peterson
From: Max on 5 Apr 2010 11:36 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",""))
From: PAL on 5 Apr 2010 12:02 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",""))
From: Max on 5 Apr 2010 12:14
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","")) |