Seniority based on hire date and age

hajiali

Well-known Member
Joined
Sep 8, 2018
Messages
624
Office Version
  1. 2016
Platform
  1. Windows
Im trying to get excel to rank the employees in seniority based on hire date and if hire date then rake them based on the oldest


NAME


HIRE DATE


DOB
BILLY9/27/198410/9/1960
TONY10/3/19877/1/1962
WILLIAM8/5/19897/6/1967
TIM3/14/19909/20/1968
JACK1/10/19933/20/1968
RANDY1/10/19935/28/1968
BRANDON1/10/19938/23/1975

<colgroup><col span="2"><col><col><col><col></colgroup><tbody>
</tbody>

in column D
Code:
=RANK(b2,$b$2:$b$8)

which does fine until i get to JACK, RANDY, and Brandon and all are raked number 5. I need a tie breaker based on the oldest. of the 3

any suggestion on what to add to Column D formula to check the DOB if employee hired on the same day or any other way to go about doing this

Thanks
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
employees based on hire date so when using the =RANK(b2,$b$2:$b$8) i get

BILLY9/27/198410/9/19601
TONY10/3/19877/1/19622
WILLIAM8/5/19897/6/19673
TIM3/14/19909/20/19684
JACK1/10/19933/20/19685
RANDY1/10/19935/28/19685
BRANDON1/10/19938/23/19755

<tbody>
</tbody>

Desired results should be as follows

BILLY9/27/198410/9/19601
TONY10/3/19877/1/19622
WILLIAM8/5/19897/6/19673
TIM3/14/19909/20/19684
JACK1/10/19933/20/19685
RANDY1/10/19935/28/19686
BRANDON1/10/19938/23/19757

<tbody>
</tbody>

because Jack is Older than Randy and Brandon he will be 5th place in rank and Randy is older than Brandon he will follow jack in the ranking. So Ranking Based on Hire Date but if employees are hired on the same day than to rank them based on age.

hope that clarifies
 
Last edited:
Upvote 0
Thanks Marcelo, were getting close to the resolution: here were the results:

BILLY
9/27/1984
10/9/1960
1
TONY
10/3/1987
7/1/1962
2
WILLIAM
8/5/1989
7/6/1967
3
TIM
3/14/1990
9/20/1968
4
JACK
1/10/1993
3/20/1968
5
RANDY
1/10/1993
5/28/1968
6
BRANDON
1/10/1993
8/23/1975
7
JOHN
3/27/1993
12/4/1976
8
KEVIN
4/2/1993
10/24/1976
9
DARRYL
5/3/1993
2/13/1963
10
REGINALD
9/7/1993
6/19/1965
11
ROBERT
10/22/1993
6/12/1974
13
DAVID
11/24/1993
1/27/1962
14
DARRYLL
1/1/1994
12/4/1968
15
TIM
7/28/1994
1/22/1966
16

<tbody>
</tbody>

Some reason its skipping a number after the first set of same Date of hire it went from 11 to 13. and when going down the list its continues.
 
Last edited:
Upvote 0
here are results further down the list:

JACOB10/17/200912/1/198878
OTIS11/16/20098/27/197579
LISA8/19/20101/12/196980
BASHIR2/28/20118/3/197182
MARISSA3/22/20112/22/198683
ANTHONY5/13/20112/9/198885
TOM7/20/20116/29/197386
KEVIN9/12/20117/20/198387
NICK10/4/201112/16/198588
JUAN10/10/20117/1/198189
DAMON12/21/20116/29/197490
JACOB12/25/20119/26/199091
KATE2/27/20127/22/198192
<colgroup><col width="142" style="width: 107pt; mso-width-source: userset; mso-width-alt: 5193;"> <col width="106" style="width: 80pt; mso-width-source: userset; mso-width-alt: 3876;"> <col width="106" style="width: 80pt; mso-width-source: userset; mso-width-alt: 3876;"> <col width="64" style="width: 48pt;"> <tbody> </tbody>

as Shown it skipped 81 and 84
 
Upvote 0
Worked perfectly for me (data sample in post 5)

A
B
C
D
1
NAME​
HIRE DATE​
DOB​
Rank​
2
BILLY​
9/27/1984​
10/9/1960​
1​
3
TONY​
10/3/1987​
7/1/1962​
2​
4
WILLIAM​
8/5/1989​
7/6/1967​
3​
5
TIM​
3/14/1990​
9/20/1968​
4​
6
JACK​
1/10/1993​
3/20/1968​
5​
7
RANDY​
1/10/1993​
5/28/1968​
6​
8
BRANDON​
1/10/1993​
8/23/1975​
7​
9
JOHN​
3/27/1993​
12/4/1976​
8​
10
KEVIN​
4/2/1993​
10/24/1976​
9​
11
DARRYL​
5/3/1993​
2/13/1963​
10​
12
REGINALD​
9/7/1993​
6/19/1965​
11​
13
ROBERT​
10/22/1993​
6/12/1974​
12​
14
DAVID​
11/24/1993​
1/27/1962​
13​
15
DARRYLL​
1/1/1994​
12/4/1968​
14​
16
TIM​
7/28/1994​
1/22/1966​
15​

<tbody>
</tbody>


Formula in D2 copied down
=RANK(B2,$B$2:$B$16,1)+COUNTIFS(B$2:B$16,B2,C$2:C$16,"<"&C2)

M.
 
Last edited:
Upvote 0
It seemed to work when I copied the hire date and DOB on different Columns. Thank you so much. Really appreciated it
 
Upvote 0

Forum statistics

Threads
1,215,020
Messages
6,122,709
Members
449,093
Latest member
Mnur

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