Joining And with Or in an If Statement

Excel_77

Active Member
Joined
Sep 15, 2016
Messages
291
Hi All,

The below code was working perfectly, however I want to add an extension to the formula to check that the football column = "yes" and the sport column = either "1" or "2" then I want "no" returned, otherwise go on to the next aspect of the formula.

=IF(Football_Column="Yes","12 Months"AND(Sport_Column="1"OR("2"),"No"),IF(Television_Column="Yes","Secure",IF(Rest_Column="Test","Check","Correct")))

How can I fix this?

Thanks in advance.
 
Last edited:

Some videos you may like

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,952
Office Version
365, 2010
Platform
Windows
=IF(Football_Column="Yes",IF(OR(Sport_Column={1,2}),"No","12 Months"),IF(Television_Column="Yes","Secure",IF(Rest_Column="Test","Check","Correct")))
 

Excel_77

Active Member
Joined
Sep 15, 2016
Messages
291
=IF(Football_Column="Yes",IF(OR(Sport_Column={1,2}),"No","12 Months"),IF(Television_Column="Yes","Secure",IF(Rest_Column="Test","Check","Correct")))
Thanks but I think I made a mistake with my original code, is should have been as follows, can this still be done?


=IF(Football_Column="Yes",AND(Sport_Column="1(6)"OR("2(9)"),"No"),IF(Television_Column="Yes","Secure",IF(Rest_Column="Test","Check","Correct")))
 
Last edited:

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,952
Office Version
365, 2010
Platform
Windows
=IF(Football_Column="Yes",IF(OR(Sport_Column={"1(6)","2(9)"}),"No","12 Months"),IF(Television_Column="Yes","Secure",IF(Rest_Column="Test","Check","Correct")))
 

Watch MrExcel Video

Forum statistics

Threads
1,099,138
Messages
5,466,903
Members
406,507
Latest member
donwiss

This Week's Hot Topics

Top