IF statment

datadummy

Active Member
Joined
Mar 16, 2017
Messages
312
Office Version
  1. 365
Platform
  1. Windows
Looking for assistance with an IF statement, what I am trying to do is say if cell I2 or J2 = Y than K2 should be Y if either cell is N then K2 should be N.
 

Excel Facts

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

Can one of I2 or J2 have Y and the other have N at the same time?
 
Upvote 0
So, what happens if one is "Y" and one is "N"?
Which one wins?
 
Upvote 0
Either I2 or J2 can be Y and the other will be N or both will be N in which case K2 should be N. As long as one has Y then K2 should be Y.
 
Upvote 0
Can I2 and J2 both be empty/blank?

As it is, the formula will result in "N"


Book1
IJK
2YY
Sheet165
Cell Formulas
RangeFormula
K2=IF(OR(I2="Y",J2="Y"),"Y","N")
 
Upvote 0
Bingo! I knew it had to be something remotely easy, thanks for your help!!
 
Upvote 0
You're welcome, glad to help.
 
Upvote 0
would it be possible to take it one step further and say if either cell is blank then leave K2 blank until I2 and J2 is populated?
 
Upvote 0
Yes, just wrap the function that jtkaw gave you in another nested if.
Code:
[COLOR=#333333]=IF(OR(I2="",J2=""),"",IF([/COLOR][COLOR=Blue]OR([COLOR=Red]I2="Y",J2="Y"[/COLOR]),"Y","N"[/COLOR][COLOR=#333333]))[/COLOR]
 
Upvote 0
BOOM, you guys rock!!! Thanks for the help that was awesome!!
 
Upvote 0

Forum statistics

Threads
1,221,811
Messages
6,162,114
Members
451,743
Latest member
matt3388

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
Back
Top