Hey guys,
After lots of trial and error, I finally figured out the formula. I didn't use vlookup. Here it is:
=IFERROR(INDEX(Sheet1!$B$4:$B$20,MATCH(Sheet2!$A$6,Sheet1!C$4:C$20,0)),"")
For those who need it, here's an explanation of what it does.
1. Cells B4:B20 in sheet1, contains the names of my co-workers
2. Cell A6 in sheet 2 contains "AM".
3. Cells C4:C20 in sheet 1, is the row that the formula needs to "look in" and it has a date in cell C4.
If someone is working "AM" on 12/06/2013, the formula will find the corresponding name in cell B4:20 and drop it in sheet 2.
Thanks for your response.
Regards,
Amar.
Bookmarks