IF statment

datadummy

Active Member
Joined
Mar 16, 2017
Messages
313
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

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
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
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

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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