If(and( & n/a

Bugner

New Member
Joined
Nov 1, 2018
Messages
1
I am having trouble getting an IF)AND statement to work

=IF(AND(J12=5,K12="Y"),"5Y",J12)

In cell J12, value can be 1 to 5 in cell K12 I have a match formula referencing another cell so either Y or #N/A is returned.

so I was hopng that if J12 =5 and K12 = Y then 5Y is displayed, otherwise just display what is in cell J12.

Formula only displays what is in J12 if there is a Y in K12?

Not sure why, as surely that equates to a value if false based on the IF(AND?

I am obvioulsy missing something? Any help appreciated.

TIA
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Are you saying that if J12 = 4 & K12 = "N" then your formula is giving "5Y"??

I copied your formula exactly and i think it should work. Do you by any chance have your calculation set to manual?
 
Upvote 0
How about
=IF(AND(J12=5,NOT(ISNA(K12))),"5Y",J12)
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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