IF AND OR problem.

  • Thread starter Thread starter Romileyrunner1
  • Start date Start date
R

Romileyrunner1

Hi,
I want to do something on the lines of ....

=IF(H3="Mr D", AND IF(J3={"Mon", "Tues", "Wed","Thurs","Fri"},12-1pm),IF
(H3="Mr O, AND IF(J3={"Mon", "Tues", "Wed","Thurs","Fri"}7.45-8.45am)

If that makes any sense to anybody AND IF ANYONE CAN SORT IT OUT, I would be
very grateful.
Thanks folks.
RR1
 
Try this:

=IF(AND(H3="Mr
D",OR(J3={"Mon","Tues","Wed","Thurs","Fri"})),"12-1pm",IF(AND(H3="Mr
O",OR(J3={"Mon", "Tues","Wed","Thurs","Fri"})),"7.45-8.45am",""))
 
Maybe...

=IF(AND(H3="Mr D",OR(J3={"Mon","Tues","Wed","Thurs","Fri"})),"12-1pm",
IF(AND(H3="Mr O",OR(J3={"Mon","Tues","Wed","Thurs","Fri"})),"7.45-8.45am",
"what happens otherwise"))
 
Try the below

=IF(ISNUMBER(MATCH(J3,{"Mon","Tues","Wed","Thurs","Fri"})),
IF(H3="Mr D","12-1pm",IF(H3="Mr O","7.45-8.45am","")),"")

If this post helps click Yes
 
The correct syntax would be:

=IF(AND(H3="Mr D",OR
(J3="Mon",J3="Tues",J3="Wed",J3="Thurs",J3="Fri")),"12-1pm",IF(AND
(H3="Mr O", OR
(J3="Mon",J3="Tues",J3="Wed",J3="Thurs",J3="Fri")),"7.45-8.45am",""))

This will return a blank if those conditions are not met.

Hope this helps.

Pete
 
'correction

=IF(ISNUMBER(MATCH(J3,{"Mon","Tues","Wed","Thurs","Fri"},0)),
IF(H3="Mr D","12-1pm",IF(H3="Mr O","7.45-8.45am","")),"")

If this post helps click Yes
 
=IF(AND(H4="Mr
D",ISNUMBER(MATCH(J4,{"Mon","Tues","Wed","Thurs","Fri"},0))),"12-1pm",IF(AND(H4="Mr
O",ISNUMBER(MATCH(J4,{"Mon","Tues","Wed","Thurs","Fri"}))),"7.45-8.45am",""))
best wishes
 
Thanks for the feedback..Please use the corrected version.

If this post helps click Yes
 
Works great Dave.
Thanks Mate.
RR1

Dave Peterson said:
Maybe...

=IF(AND(H3="Mr D",OR(J3={"Mon","Tues","Wed","Thurs","Fri"})),"12-1pm",
IF(AND(H3="Mr O",OR(J3={"Mon","Tues","Wed","Thurs","Fri"})),"7.45-8.45am",
"what happens otherwise"))
 
Back
Top