Nested IF, AND, OR

smg

New Member
Joined
Aug 22, 2012
Messages
14
Hi Guys,

I have inserted the following formula into Z3 cell:

=IF(AND(ISNA(V3),ISNA(W3)),"NA",IF(OR(TRIM((U3)*1)=TRIM((V3)*1),TRIM((U3)*1)=TRIM((W3)*1)),"OK","ERROR"))

The purpose of this formula is to compare values between U3 and V3 and U3 and W3. Usually V and W are mutually exclusive, so if one contain the value, the other one will not ("N/A"). That's why I need the first check for - to check whether two of them are "N/A". If at least one contain the value then I want to compare this value with U and then return one of the following arguments "OK", or "ERROR". The problem is that even when one V or W contains the value, it returns "#N/A", that is the value that I want to avoid.

Can anybody help me with that please? I've checked the formula a few times and it seems correct.

Cheers,
Slawek
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
OK, resolved. I used the following, simpler formula:


=IF(ISNA(V3),IF(W3=U3*1,"OK","ERROR"),IF(V3=U3*1,"OK","ERROR"))


"1" is just to convert a text to a number.

Thanks anyway for viewing this post.


S
 
Upvote 0

Forum statistics

Threads
1,215,949
Messages
6,127,892
Members
449,411
Latest member
AppellatePerson

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