Nested VLookup in IF statement - with ISERROR

Robbo679

New Member
Joined
Aug 2, 2015
Messages
5
Hi I wonder if anyone can guide me please.

I have 3 Sheets that an item moves across depending on its delivery progress, therefore is should only ever be on one Sheet.
I then have a Master Sheet to have an over sight over all items, which will also then be used to gather further data (I will sort that after).

Sheets: Master, New Deliveries, Deliveries Offered, Delivered

PH001
New Deliveries
PH002
Deliveries Offered
PH003
PH004
FALSE

<tbody>
</tbody>

I have a VLookup to see if PH001 is on the 'New Deliveries' Sheet - Simple enough:
=IF(VLOOKUP($A3,'New Deliveries'!$A:$A,1,FALSE)=$A3,"New Deliveries")

However if PH001 has now moved to Deliveries Offered I get the error #N/A
So I have incorporated ISERROR

=IF(ISERROR(VLOOKUP(A4,'New Deliveries'!A:A,1,FALSE)=A4),IF(ISERROR(VLOOKUP(A4,'Deliveries Offered'!A:A,1,FALSE)=A4),"Deliveries Offered"),"New Deliveries")

These leads to the result (as per PH004 above) of FALSE.

Once this is worked out I will then duplicate the solution to incorporate the 'Delivered' Sheet.


Any help or better solution to the issue is really appricieated.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
The ISERROR checks if a value is an error and returns TRUE or FALSE. If you get a "FALSE" it means that the value you test is not an error... you would need to check your IF statement to see which one is returning the FALSE and set the return value for false that you want to get.

I'm pretty sure the solution is quite simple, as in putting the desired delivery status for A4 somewhere in your IF statement as return value for FALSE but I'm not good enough as to tell you where to put it wihtout a sample of your data and knowing on which sheet your formula is.

Could you posta a small sample of the data of all sheets? I'll try to simulate it and see i I can figure it out but having a real sample would help.
 
Last edited:
Upvote 0
Might not be the cleanest solution ever but it seems to do be doing the trick.

I put PH001 in new_deliveries, PH002 in deliveries_offered, PH003 in delivered and volountarily omitted to put PH004 in any sheet so you have a return value if the shipment is on none of the 3 other sheets.

You will have to adjust the sheets name to match yours, I have a habit of not putting spaces in sheet names but use the _ instead. This formula is for the Master Sheet, sitting in B1.

Hope this helps.

AB
1PH001New Deliveries
2PH002Deliveries Offered
3PH003Delivered
4PH004Shipment Not Found

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
MasterSheet

Worksheet Formulas
CellFormula
B1=IF(ISERROR(VLOOKUP(A1,New_Deliveries!A:A,1,FALSE)=A1),IF(ISERROR(VLOOKUP(A1,Deliveries_Offered!A:A,1,FALSE)=A1),IF(ISERROR(VLOOKUP(A1,Delivered!A:A,1,FALSE)=A1),"Shipment Not Found","Delivered"),"Deliveries Offered"),"New Deliveries")
B2=IF(ISERROR(VLOOKUP(A2,New_Deliveries!A:A,1,FALSE)=A2),IF(ISERROR(VLOOKUP(A2,Deliveries_Offered!A:A,1,FALSE)=A2),IF(ISERROR(VLOOKUP(A2,Delivered!A:A,1,FALSE)=A2),"Shipment Not Found","Delivered"),"Deliveries Offered"),"New Deliveries")
B3=IF(ISERROR(VLOOKUP(A3,New_Deliveries!A:A,1,FALSE)=A3),IF(ISERROR(VLOOKUP(A3,Deliveries_Offered!A:A,1,FALSE)=A3),IF(ISERROR(VLOOKUP(A3,Delivered!A:A,1,FALSE)=A3),"Shipment Not Found","Delivered"),"Deliveries Offered"),"New Deliveries")
B4=IF(ISERROR(VLOOKUP(A4,New_Deliveries!A:A,1,FALSE)=A4),IF(ISERROR(VLOOKUP(A4,Deliveries_Offered!A:A,1,FALSE)=A4),IF(ISERROR(VLOOKUP(A4,Delivered!A:A,1,FALSE)=A4),"Shipment Not Found","Delivered"),"Deliveries Offered"),"New Deliveries")

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Might not be the cleanest solution ever but it seems to do be doing the trick.

I put PH001 in new_deliveries, PH002 in deliveries_offered, PH003 in delivered and volountarily omitted to put PH004 in any sheet so you have a return value if the shipment is on none of the 3 other sheets.

You will have to adjust the sheets name to match yours, I have a habit of not putting spaces in sheet names but use the _ instead. This formula is for the Master Sheet, sitting in B1.

Hope this helps.

A
B
1
PH001
New Deliveries
2
PH002
Deliveries Offered
3
PH003
Delivered
4
PH004
Shipment Not Found

<tbody>
</tbody>
MasterSheet


Worksheet Formulas
Cell
Formula
B1
=IF(ISERROR(VLOOKUP(A1,New_Deliveries!A:A,1,FALSE)=A1),IF(ISERROR(VLOOKUP(A1,Deliveries_Offered!A:A,1,FALSE)=A1),IF(ISERROR(VLOOKUP(A1,Delivered!A:A,1,FALSE)=A1),"Shipment Not Found","Delivered"),"Deliveries Offered"),"New Deliveries")
B2
=IF(ISERROR(VLOOKUP(A2,New_Deliveries!A:A,1,FALSE)=A2),IF(ISERROR(VLOOKUP(A2,Deliveries_Offered!A:A,1,FALSE)=A2),IF(ISERROR(VLOOKUP(A2,Delivered!A:A,1,FALSE)=A2),"Shipment Not Found","Delivered"),"Deliveries Offered"),"New Deliveries")
B3
=IF(ISERROR(VLOOKUP(A3,New_Deliveries!A:A,1,FALSE)=A3),IF(ISERROR(VLOOKUP(A3,Deliveries_Offered!A:A,1,FALSE)=A3),IF(ISERROR(VLOOKUP(A3,Delivered!A:A,1,FALSE)=A3),"Shipment Not Found","Delivered"),"Deliveries Offered"),"New Deliveries")
B4
=IF(ISERROR(VLOOKUP(A4,New_Deliveries!A:A,1,FALSE)=A4),IF(ISERROR(VLOOKUP(A4,Deliveries_Offered!A:A,1,FALSE)=A4),IF(ISERROR(VLOOKUP(A4,Delivered!A:A,1,FALSE)=A4),"Shipment Not Found","Delivered"),"Deliveries Offered"),"New Deliveries")

<tbody>
</tbody>

<tbody>
</tbody>

I have jsut spent 20 mins trying to work out how to best create a table here to give you a better understanding.....I prefere Excel than trying to use this :LOL:

You solution works perfectly, I think I was close but missed something. I will compare and learn.

Thank you for help(y)
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,583
Members
449,089
Latest member
Motoracer88

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