need help with V lookups

S

Scottinphx

I need a formula that based on a cell completes a Vlookup in one worksheet
tab, and if it can not find a value it completes a Vlookup in a different
worksheet tab.
 
T

Toppers

=If(ISNA(vlookup1),IF(ISNA(Vlookup2),"No match",vlookup2),Vlookup1)

where

VLOOKUP1 and VLOOKUP2 are the VLOOKUP formulae for your two tabs.

HTH
 
P

Pete_UK

Could do with some more detail, but basically you want something like:

=IF(ISNA(VLOOKUP(to_first_sheet)),IF(ISNA(VLOOKUP(to_second_sheet),"Not
Present",VLOOKUP(to_second_sheet)),VLOOKUP(to_first_sheet))

VLOOKUP itself takes four parameters, so it might look like this:

VLOOKUP(A2,Sheet1!A1:B50,2,0) for the first sheet, and

VLOOKUP(A2,Sheet2!A1:B100,2,0) for the second sheet.

Obviously, only you can supply the details ...

Hope this helps.

Pete
 
M

Mark

Scottinphx said:
I need a formula that based on a cell completes a Vlookup in one worksheet
tab, and if it can not find a value it completes a Vlookup in a different
worksheet tab.

Try using something like this:
=IF(ISERROR(VLOOKUP(A!,List,2)),VLOOKUP(A1,List,2),VLOOKUP(A1,OtherList,2))

If the first lookup finds no match it returns an error. This results
in a true return to the IsError function which tells the IF Function to
refer to the VLookup using OtherList. You should be able to change the
array names to the ones you are currently using and have it work as you
requested.
 
Top