Lookup employee salary on a specified date

stevejd

New Member
Joined
Sep 17, 2008
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Hello all - I'm sure that I should know how to do this but can't for the life of me work out how! I have two tabs, one shows all employees (including their unique employee number) with a separate row showing each salary period eg

nameemployee refsalaryperiod startperiod end
smith1234567820,00001/04/201331/03/2014
smith1234567825,00001/04/201431/03/2015
jones2345678927,50017/03/201431/03/2015

<tbody>
</tbody>

the second tab shows a list of allowances paid to staff and the date that they were paid - for each allowance, I need to look up the employee's salary at the time that the allowance was paid, eg

nameemployee refallowance typedate paidsalary
smith12345678overtime x1.517/08/2013?
smith12345678overtime x1.527/09/2013?
smith12345678additional hours03/04/2014?

<tbody>
</tbody>

Help!
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
A couple of possibilities (formulas in E7:F7 copied down):


Excel 2010
ABCDEF
1nameemployee refsalaryperiod startperiod end
2smith1234567820,00001/04/201331/03/2014
3smith1234567825,00001/04/201431/03/2015
4jones2345678927,50017/03/201431/03/2015
5
6nameemployee refallowance typedate paidsalarysalary
7smith12345678overtime x1.517/08/20132000020000
8smith12345678overtime x1.527/09/20132000020000
9smith12345678additional hours03/04/20142500025000
Sheet9
Cell Formulas
RangeFormula
E7=LOOKUP(2,1/((B$2:B$4=B7)*(D$2:D$4<=D7)*(E$2:E$4>=D7)),C$2:C$4)
F7=INDEX(C$2:C$4,MATCH(1,INDEX((B$2:B$4=B7)*(D$2:D$4<=D7)*(E$2:E$4>=D7),),0))
 
Upvote 0
Solution
I can't speak for the lookup, but the Index formula worked like a dream (even if looking up 220,000 allowances against 27,000 employee records meant that it took 45 minutes to process!)

Many thanks for your help Andrew
 
Upvote 0

Forum statistics

Threads
1,216,086
Messages
6,128,736
Members
449,466
Latest member
Peter Juhnke

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