Combining two lookup commands

FACTOR 21

Board Regular
I am trying to combine two LOOKUP commands in one cell, with no joy, can anyone enlighten me.

The first is

Code:
``=VLOOKUP(C330,'Trust Acc'!\$A\$2:\$B\$20,2,FALSE)``

If the result of this returns 0 the second is

Code:
``=VLOOKUP(B330,'Jez test'!\$A\$2:\$F\$200000,6,False)``

I have researched and tried many variances but to no avail.

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Maybe

=IF(VLOOKUP(C330,'Trust Acc'!\$A\$2:\$B\$20,2,FALSE)=0,VLOOKUP(B330,'Jez test'!\$A\$2:\$F\$200000,6,False),0)

Thanks for the quick response.

If the first lookup is true '0' is returned as the result and not the value in column 2, if the first lookup is false the correct result is returned from the second lookup.

Blimey, I botched that up good and proper, apologies.

Try (untested)
=IF(VLOOKUP(C330,'Trust Acc'!\$A\$2:\$B\$20,2,FALSE)<>0,VLOOKUP(C330,'Trust Acc'!\$A\$2:\$B\$20,2,FALSE),VLOOKUP(B330,'Jez test'!\$A\$2:\$F\$200000,6,False))

That works perfectly, many thanks for your quick response and solution, much appreciated.

Have a great Weekend

Replies
8
Views
261
Replies
1
Views
156
Replies
6
Views
190
Replies
6
Views
559
Replies
5
Views
252

1,202,983
Messages
6,052,903
Members
444,610
Latest member
dodong

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.

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

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