VLOOKUP to check 2 lists?

sknight22

Board Regular
Joined
Feb 16, 2016
Messages
75
Hi,

I would like to search the 2 lists below for a specific trailer number and return the bay number. Is it possible to search both lists?


[TABLE="width: 467"]
<colgroup><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD="colspan: 3"]TRAILER PARK 1[/TD]
[TD][/TD]
[TD="colspan: 3"]TRAILER PARK 2[/TD]
[/TR]
[TR]
[TD]Trailer[/TD]
[TD]Bay[/TD]
[TD] [/TD]
[TD][/TD]
[TD]Trailer[/TD]
[TD]Bay[/TD]
[TD] [/TD]
[/TR]
[TR]
[TD]TEST[/TD]
[TD]1[/TD]
[TD]TP1[/TD]
[TD][/TD]
[TD] [/TD]
[TD]1[/TD]
[TD]TP2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]2[/TD]
[TD]TP1[/TD]
[TD][/TD]
[TD] [/TD]
[TD]2[/TD]
[TD]TP2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]3[/TD]
[TD]TP1[/TD]
[TD][/TD]
[TD] [/TD]
[TD]3[/TD]
[TD]TP2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]4[/TD]
[TD]TP1[/TD]
[TD][/TD]
[TD] [/TD]
[TD]4[/TD]
[TD]TP2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]5[/TD]
[TD]TP1[/TD]
[TD][/TD]
[TD] [/TD]
[TD]5[/TD]
[TD]TP2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]6[/TD]
[TD]TP1[/TD]
[TD][/TD]
[TD] [/TD]
[TD]6[/TD]
[TD]TP2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]7[/TD]
[TD]TP1[/TD]
[TD][/TD]
[TD] [/TD]
[TD]7[/TD]
[TD]TP2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]8[/TD]
[TD]TP1[/TD]
[TD][/TD]
[TD] [/TD]
[TD]8[/TD]
[TD]TP2[/TD]
[/TR]
[TR]
[TD] [/TD]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
[TD][/TD]
[TD] [/TD]
[TD]34[/TD]
[TD]TP2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]33[/TD]
[TD]TP1[/TD]
[TD][/TD]
[TD] [/TD]
[TD]35[/TD]
[TD]TP2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]34[/TD]
[TD]TP1[/TD]
[TD][/TD]
[TD] [/TD]
[TD]36[/TD]
[TD]TP2[/TD]
[/TR]
[TR]
[TD] [/TD]
[TD]35[/TD]
[TD]TP1[/TD]
[TD][/TD]
[TD] [/TD]
[TD]37[/TD]
[TD]TP2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD]38[/TD]
[TD]TP2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD]39[/TD]
[TD]TP2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD]40[/TD]
[TD]TP2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD]41[/TD]
[TD]TP2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD]42[/TD]
[TD]TP2[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD] [/TD]
[TD]43[/TD]
[TD]TP2[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi

If you know you're going to return an error if it's not found in the first table then you can check for that error and use it to check the second.

Something along the lines of...

Code:
=IFERROR(VLOOKUP(VAL,TAB,IND,FALSE),VLOOKUP(VAL,TAB2,IND,FALSE))

HTH
 
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