I am the distint "pleasure" of helping my wife with a task that is way beyond me... 
There are 2 separate files, from EMP_DB.XLS I need to pull the data in two columns (REF # and SPF) to two columns in PAY_DB.XLS.
In both tables I have LNAME, FNAME and SHIFT that match. Therefore I will use the following example:
Table 1 - PAY_DB:
LNAME FNAME SHIFT REF # SPF
Doe John 1 ?? ??
Boe Jane 2 ?? ??
Smith Will 2 ?? ??
Donner Bob 1 ?? ??
Table 2 - EMP_DB.XLS:
Doe John 1 R34590 2234
Doe John 2 R34591 2234
Boe Jane 1 R23456 5672
Boe Jane 2 R23457 5672
Smith Will 1 R98012 2098
Smith Will 2 R98013 2098
Donner Bob 1 R67843 9112
Donner Bob 2 R67842 9112
(Each shift and each employee has their own REF # therefore I need to have the search go through and look for match on LNAME, FNAME and then SHIFT and return the correct results.) As you can see the program needs to go through to see if person was on 1st or 2nd shift and then return the right REF # back - since each is assign different numbers.
I thought I had part of it working but my data table (EMP_DB) goes to row 295 and therefore my return stops at that point on the PAY_DB table at row 295 -- ALL subsequent rows have "VALUE" error. Here is the formula I was using:
=VLOOKUP(L295,'C:\Documents and Settings\me\Desktop\PAY_DB.xls'!KN_DB,4,'C:\Documents and Settings\me\Desktop\[PAY_DB.xls]LIVE'!$D$2:$D$295) -- "LIVE" is a table range.
I thought I could use QUERY WIZARD but that does not seem to help.
Anyone have a solution - my SQL is very very limited if someone is thinking in that direction.
I find this daunting and out of my skill level ALL HELP would be appreciated.
Steve
There are 2 separate files, from EMP_DB.XLS I need to pull the data in two columns (REF # and SPF) to two columns in PAY_DB.XLS.
In both tables I have LNAME, FNAME and SHIFT that match. Therefore I will use the following example:
Table 1 - PAY_DB:
LNAME FNAME SHIFT REF # SPF
Doe John 1 ?? ??
Boe Jane 2 ?? ??
Smith Will 2 ?? ??
Donner Bob 1 ?? ??
Table 2 - EMP_DB.XLS:
Doe John 1 R34590 2234
Doe John 2 R34591 2234
Boe Jane 1 R23456 5672
Boe Jane 2 R23457 5672
Smith Will 1 R98012 2098
Smith Will 2 R98013 2098
Donner Bob 1 R67843 9112
Donner Bob 2 R67842 9112
(Each shift and each employee has their own REF # therefore I need to have the search go through and look for match on LNAME, FNAME and then SHIFT and return the correct results.) As you can see the program needs to go through to see if person was on 1st or 2nd shift and then return the right REF # back - since each is assign different numbers.
I thought I had part of it working but my data table (EMP_DB) goes to row 295 and therefore my return stops at that point on the PAY_DB table at row 295 -- ALL subsequent rows have "VALUE" error. Here is the formula I was using:
=VLOOKUP(L295,'C:\Documents and Settings\me\Desktop\PAY_DB.xls'!KN_DB,4,'C:\Documents and Settings\me\Desktop\[PAY_DB.xls]LIVE'!$D$2:$D$295) -- "LIVE" is a table range.
I thought I could use QUERY WIZARD but that does not seem to help.
Anyone have a solution - my SQL is very very limited if someone is thinking in that direction.
I find this daunting and out of my skill level ALL HELP would be appreciated.
Steve