IF + OR + ISERROR Logic doesn't seem to work

ivancans

New Member
Joined
Feb 7, 2017
Messages
6
Hi guys,

Please explain me what am I doing wrong with the following situation:

I have two tables, in both tables I have sim card numbers and according contact addresses. The reason why I need two tables is that in one of those tables, addresses are more fresh but the problem is that not every sim card number has the more fresh address therefore I have to use less fresh address or the address from first table. Because VLOOKUP would give me either: address from the fresh table, zero as there is no address indicated for that number or N/A as sim card numbers may very well be only in one table I have written this formula that does not work:

=IF(OR(VLOOKUP(sim_number;fresh_table;2;0)=0;ISERROR(VLOOKUP(sim_number;fresh_table;2;0)));value from old table;VLOOKUP(A2;fresh_table;2;0))

Evaluating the formula I can see that the problem technically is with the fact that OR statement takes N/A as the results and therefore IF statement doesn't understand what to do and gives yet another N/A but I don't get it why this happens if I have an OR statement that needs only one TRUE value and even if both of those values would be FALSE then IF statement would go further, to the part of "if not true".

I would really appreciate the help

<tbody>
</tbody>
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi guys,

Please explain me what am I doing wrong with the following situation:

I have two tables, in both tables I have sim card numbers and according contact addresses. The reason why I need two tables is that in one of those tables, addresses are more fresh but the problem is that not every sim card number has the more fresh address therefore I have to use less fresh address or the address from first table. Because VLOOKUP would give me either: address from the fresh table, zero as there is no address indicated for that number or N/A as sim card numbers may very well be only in one table I have written this formula that does not work:

=IF(OR(VLOOKUP(sim_number;fresh_table;2;0)=0;ISERROR(VLOOKUP(sim_number;fresh_table;2;0)));value from old table;VLOOKUP(A2;fresh_table;2;0))

Evaluating the formula I can see that the problem technically is with the fact that OR statement takes N/A as the results and therefore IF statement doesn't understand what to do and gives yet another N/A but I don't get it why this happens if I have an OR statement that needs only one TRUE value and even if both of those values would be FALSE then IF statement would go further, to the part of "if not true".

I would really appreciate the help

<tbody>
</tbody>

=IF(IFERROR(VLOOKUP(sim_number;fresh_table;2;0);"")="";value from old table;VLOOKUP(A2;fresh_table;2;0))
 
Upvote 0

Forum statistics

Threads
1,215,328
Messages
6,124,299
Members
449,149
Latest member
mwdbActuary

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