If function help

LostinVA

New Member
Joined
May 23, 2018
Messages
43
Novice here.. Can anyone help with the below formula? It seems to be working for the first condition but not the second IF.. Column BC contains the values 'Y', 'N', and blank. So the second IF should run if BC is not 'N' (BC would be 'Y' or blank)

IF(BC2 = "N", U2="NO", IF(R2=K2,"NO","YES"))

Appreciate all help, ty!
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
If BC2 = "N", your formula will return TRUE or FALSE based on whether U2="NO"
If BC2 <> "N" it will go to the second IF. What the second IF does is pretty clear.

If that is what you want your formula to do then it is correct. If it is not working as expected then your problem is in the data. What data do you have in R2 and K2? What result are you expecting?

Here is your formula in column A, and results for every combination of data you are checking. Looks OK to me.

$scratch.xlsm
AKRUBC
2FALSEYESN
3TRUENON
4YES12Y
5NO11Y
6YES12
7NO11
Fractions
Cell Formulas
RangeFormula
A2:A7A2=IF(BC2 = "N", U2="NO", IF(R2=K2,"NO","YES"))
 
Upvote 0
If BC2 = "N", your formula will return TRUE or FALSE based on whether U2="NO"
If BC2 <> "N" it will go to the second IF. What the second IF does is pretty clear.

If that is what you want your formula to do then it is correct. If it is not working as expected then your problem is in the data. What data do you have in R2 and K2? What result are you expecting?

Here is your formula in column A, and results for every combination of data you are checking. Looks OK to me.

$scratch.xlsm
AKRUBC
2FALSEYESN
3TRUENON
4YES12Y
5NO11Y
6YES12
7NO11
Fractions
Cell Formulas
RangeFormula
A2:A7A2=IF(BC2 = "N", U2="NO", IF(R2=K2,"NO","YES"))
[/RA
Cell Formulas
RangeFormula
 
Upvote 0
@6StringJazzer,

Thanks for your reply!

Here's what I'm trying to do:

If BC2 = "N", then the formula will return "NO" in U2.
If BC2 = "Y" or is blank then it it executes another formula where if R2=K2, then U2 = "NO". Otherwise, U2 = "YES"

Hope that makes sense! TY!
 
Upvote 0
Perhaps:
=IF(BC2="N","NO",IF(AND(OR(BC2="Y",BC2=""),R2=K2),"NO","YES"))
 
Upvote 0

Forum statistics

Threads
1,215,980
Messages
6,128,075
Members
449,418
Latest member
arm56

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