Combining two lookup commands

FACTOR 21

Board Regular
Joined
Mar 3, 2014
Messages
110
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.

Thanks in advance
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Maybe

=IF(VLOOKUP(C330,'Trust Acc'!$A$2:$B$20,2,FALSE)=0,VLOOKUP(B330,'Jez test'!$A$2:$F$200000,6,False),0)
 
Upvote 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.
 
Upvote 0
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))
 
Upvote 0
That works perfectly, many thanks for your quick response and solution, much appreciated.

Have a great Weekend :)
 
Upvote 0

Forum statistics

Threads
1,224,271
Messages
6,177,602
Members
452,784
Latest member
talippo

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