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:

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.

Scott Huish

MrExcel MVP
Joined
Mar 17, 2004
Messages
19,958
Office Version
  1. 365
  2. 2010
Platform
  1. 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,958
Office Version
  1. 365
  2. 2010
Platform
  1. 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,129,383
Messages
5,635,942
Members
416,889
Latest member
dhegs

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top