etuskan

New Member
Joined
Aug 15, 2012
Messages
5
I have following tables:
Employee #Annual Leave Date
107.07.2010
106.06.2011
108.08.2012
208.08.2009
208.08.2010
208.08.2011

<tbody>
</tbody>

Employee #Paid Leave DateDays
15.5.201014
15.5.201118
15.5.201220
26.6.201014
26.6.201118

<tbody>
</tbody>

I would like to create a formula that looks up for Employee # and date (first two columns) from the first table and give the results from the second table.
Vlookup(Employee#1 and 07.07.2010) should give me 14
Vlookup(Employee#1 and 06.06.2011) should give me 18
Vlookup(Employee#1 and 08.08.2012) should give me 20
Vlookup(Employee#2 and 08.08.2010) should give me 14
Vlookup(Employee#2 and 08.08.2011) should give me 18

I am looking forward for your support
Thank you
Cheers!
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
i think your data is wrong
a date with . is for excel a text!

why table 1?
table 2 give the answers
 
Last edited:
Upvote 0

Book1
ABCDEFG
10Employee #Paid Leave DateDays
1115-5-20101417-7-201014
1215-5-20111816-6-201118
1315-5-20122018-8-201220
1426-6-20101428-8-201014
1525-5-20121828-8-201218
Blad1
Cell Formulas
RangeFormula
G11=SUMPRODUCT((LARGE(($A$11:$A$15=E11)*($B$11:$B$15<=F11)*($B$11:$B$15),1)=$B$11:$B$15)*($A$11:$A$15=E11)*$C$11:$C$15)
G12=SUMPRODUCT((LARGE(($A$11:$A$15=E12)*($B$11:$B$15<=F12)*($B$11:$B$15),1)=$B$11:$B$15)*($A$11:$A$15=E12)*$C$11:$C$15)
G13=SUMPRODUCT((LARGE(($A$11:$A$15=E13)*($B$11:$B$15<=F13)*($B$11:$B$15),1)=$B$11:$B$15)*($A$11:$A$15=E13)*$C$11:$C$15)
G14=SUMPRODUCT((LARGE(($A$11:$A$15=E14)*($B$11:$B$15<=F14)*($B$11:$B$15),1)=$B$11:$B$15)*($A$11:$A$15=E14)*$C$11:$C$15)
G15=SUMPRODUCT((LARGE(($A$11:$A$15=E15)*($B$11:$B$15<=F15)*($B$11:$B$15),1)=$B$11:$B$15)*($A$11:$A$15=E15)*$C$11:$C$15)
 
Upvote 0
Employee #Annual Leave Date
17/7/201014
16/6/201118
18/8/201220
28/8/2009not available
28/8/201014
28/8/201118
Employee #Paid Leave DateDays
15/5/201014
15/5/201118
15/5/201220
26/6/201014
26/6/201118

<tbody>
</tbody>

In C2 control+shift+enter, not just enter, and copy down:

=IFERROR(INDEX($C$10:$C$14,MATCH(B2,IF($A$10:$A$14=A2,$B$10:$B$14),1)),"not available")
 
Upvote 0
A10:C15 is second table.

Formula in D2, then drag down

=SUMPRODUCT(($A$11:$A$15=A2)*(YEAR($B$11:$B$15)=YEAR(B2))*($C$11:$C$15))
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,093
Latest member
dbomb1414

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