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>
 

Some videos you may like

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

jarjarbingie

Well-known Member
Joined
Nov 15, 2012
Messages
607
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))
 

Watch MrExcel Video

Forum statistics

Threads
1,123,505
Messages
5,602,062
Members
414,498
Latest member
jordanmiller7890

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
Top