ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Nested Vlookups (https://www.excelbanter.com/excel-worksheet-functions/82822-nested-vlookups.html)

TarekHamouda

Nested Vlookups
 

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))


--
TarekHamouda
------------------------------------------------------------------------
TarekHamouda's Profile: http://www.excelforum.com/member.php...o&userid=33392
View this thread: http://www.excelforum.com/showthread...hreadid=532160


TarekHamouda

Nested Vlookups
 

After I posted I had this idea:

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

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


--
TarekHamouda
------------------------------------------------------------------------
TarekHamouda's Profile: http://www.excelforum.com/member.php...o&userid=33392
View this thread: http://www.excelforum.com/showthread...hreadid=532160


Bondi

Nested Vlookups
 
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



All times are GMT +1. The time now is 09:30 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com