How to use two VLOOKUPs in one cell??

ericaindallas

New Member
Joined
Aug 20, 2009
Messages
45
Example...
I have a LIST of employees with the dates they were sick, on vacation or had jury duty... I would like to display the information in the OUTPUT FORMAT below with the Description populated by employee, by date.

I have over 30,000 accounts I need to do this with 100 dates.

LIST
Employee Date Description
Belford, Eugene 2/17/09 Sick
Goldstein, Emmanuel 2/26/09 Vacation
Goldstein, Emmanuel 2/27/09 Vacation
Libby, Kate 2/12/09 Vacation
Libby, Kate 2/13/09 Vacation
Libby, Kate 2/16/09 Vacation
Libby, Kate 2/25/09 Sick
Libby, Kate 2/26/09 Sick
Libby, Kate 2/27/09 Sick
Murphy, Dade 2/12/09 Vacation
Murphy, Dade 2/13/09 Vacation
Murphy, Dade 2/16/09 Vacation
Murphy, Dade 2/27/09 Sick
Pardella, Joey 2/9/09 Jury Duty
Sanchez, Ramon 2/9/09 Sick
Sanchez, Ramon 2/10/09 Jury Duty
Sanchez, Ramon 2/11/09 Jury Duty
Sanchez, Ramon 2/11/09 Vacation
Sanchez, Ramon 2/12/09 Vacation

OUTPUT FORMAT
Date
Employee 2/9/09 2/10/09 2/11/09 2/12/09 2/13/09 2/16/09 2/17/09 2/18/09 2/19/09 2/20/09 2/23/09 2/24/09 2/25/09 2/26/09 2/27/09
Belford, Eugene
Goldstein, Emmanuel
Libby, Kate
Murphy, Dade
Pardella, Joey
Sanchez, Ramon


Thanks! Erica
:confused:
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hello and welcome to the board,

Your output format is not very clear,

did you try Pivot table?

If pivot doesn't solve the issue, post output format with expected results
 
Upvote 0
Sorry if I was not clear enough... would help if I use cell numbers. I am not using a pivot table because of the large amount of data... the data I enclosed is just an example.

Looking at the OUTPUT FORMAT, let's begin with the first name, "Belford, Eugene" (A3) and the first date "2/9/09" (B2), I would want the formula after the name and under the date (B3, C3, D3, etc.)... for "Belford, Eugene" and the fields would be blank except under "2/17/09" (H3), it would read "Sick"... so on and forth for each person and each date populated with a description or blank.

Thanks! Erica
 
Upvote 0
I understood that you wish to write at the intersect Employee/Date the type of registered activity.
If this is the case:
-let's suppose your LIST is on Sheet1, colums A-B-C
-you create on Sheet2, from A2 downward, the unique list of employees, and from B1 rightward the list of dates of your concern
Then in B2 you set the formula
Code:
=IF(ISERR(VLOOKUP(B$1,OFFSET(Sheet1!$B$1,MATCH($A2,Sheet1!$A:$A,0)-1,0,COUNTIF(Sheet1!$A:$A,$A2),2),2,0)),"",VLOOKUP(B$1,OFFSET(Sheet1!$B$1,MATCH($A2,Sheet1!$A:$A,0)-1,0,COUNTIF(Sheet1!$A:$A,$A2),2),2,0))
Copy this formula to the right, for all the dates you set in line 1, then copy formulas in line 2 down for all the names listed in col A

Bye.
 
Upvote 0
try this,
Excel Workbook
ABC
1EmployeeDateDescription
2Belford, Eugene17-FebSick
3Goldstein, Emmanuel26-FebVacation
4Goldstein, Emmanuel27-FebVacation
5Libby, Kate12-FebVacation
6Libby, Kate13-FebVacation
7Libby, Kate16-FebVacation
8Libby, Kate25-FebSick
9Libby, Kate26-FebSick
10Libby, Kate27-FebSick
11Murphy, Dade12-FebVacation
12Murphy, Dade13-FebVacation
13Murphy, Dade16-FebVacation
14Murphy, Dade27-FebSick
15Pardella, Joey09-FebJury
16Sanchez, Ramon09-FebSick
17Sanchez, Ramon10-FebJury
18Sanchez, Ramon11-FebJury
19Sanchez, Ramon11-FebVacation
20Sanchez, Ramon12-FebVacation
Sheet2
Excel 2003
Excel Workbook
FGHIJKLMNOPQRS
109-Feb10-Feb11-Feb12-Feb13-Feb14-Feb15-Feb16-Feb17-Feb18-Feb19-Feb20-Feb21-Feb
2Belford, EugeneSick
3Goldstein, Emmanuel
4Libby, KateVacationVacationVacation
5Murphy, DadeVacationVacationVacation
6Pardella, JoeyJury
7Sanchez, RamonSickJuryJuryVacation
Sheet2
Excel 2003
Cell Formulas
RangeFormula
G2=IF(SUM(INDEX(($A$2:$A$20=$F2)*($B$2:$B$20=G$1),0)),INDEX($C$2:$C$20,MATCH(1,INDEX(($A$2:$A$20=$F2)*($B$2:$B$20=G$1),0),0)),"")
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

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