Nested Vlookups

T

TarekHamouda

I have two excel workbooks, one including data on current employees and
one including data on terminated employees, both start with the
employee No in the first column, I would like to make a vlookup on both
files at the same time, so that for example when the employee # Im
trying to vlookup is not found in the current employees file, the
vlookup would look for it in the terminated employees files instead of
just returning #N/A.

Can it be something like this:

if((vlookup(A1,current employees.xls,24,false),vlookup(A1,current
employees.xls,24,false),vlookup(A1, terminated employees.xls,24,false))
 
T

TarekHamouda

After I posted I had this idea:

=IF($A$1=1,VLOOKUP(A4,'[Master (Ma
06).xls]masTER'!$A:$D,3,FALSE),VLOOKUP(A4,'[Termfile (Ma
06).xls]terMFILE'!$A:$E,5,FALSE))

so by seting A1 cell to 1 OR 2 I can switch the values to read from tw
files
 
B

Bondi

Hi,

=IF(ISNA(VLOOKUP(A1,Ref to Current employees
Array,24,FALSE)),VLOOKUP(A1,Ref to Terminated Employees
Array,24,FALSE),VLOOKUP(A1,Ref to Current employees Array,24,FALSE))

Regards,
Bondi
 
Top