|
|
|
|
|
|
Insert Tag Line HERE.....
|
ok, i have over 2000 people on this list, so i simply want to plug in a name, or seniority number and see where this person will be on the seniority list at any given year value i plug in .
if it takes three or more plug ins to do this, thats fine. (in other words, plug in number, get an answer, then use that answer to plug in somewhere to get another answer)
__________________
Marc |
||
|
|
|
|
Cars & Coffee Killer
Join Date: Sep 2004
Location: State of Failure
Posts: 32,246
|
You've exhausted my Excel skills. I'd use a database and some procedural code to solve that problem. For something so small I'd just use Access and VB.
__________________
Some Porsches long ago...then a wankle... 5 liters of VVT fury now -Chris "There is freedom in risk, just as there is oppression in security." |
||
|
|
|
|
Moderator
|
I did a quick and dirty one in five minutes. It's in your inbox.
Legion - email me and I'll send you the sheet. Basically, I create a named value called "offset" by adding n years to today's date. Calculate years of service by subtracting the date of hire from the offset. Then use an IF statement to ask if the age is 60 or less. If true, value is 0, if false, value is -999. Then add the years of service to the result of the IF statement. That way, if the pilot is over 60, their years of service goes to a big negative number, but pilots under 60 have the years of service as normal. Sort on this figure.
__________________
Don Plumley M235i memories: 87 911, 96 993, 13 Cayenne Last edited by Don Plumley; 03-14-2006 at 08:06 PM.. |
||
|
|
|
|
Moderator
|
It's quite simple.
Convert the mm/dd/yy into Julian date format - YYYYDDD Today is J-date: 2006073. Excel can do that for you: use the 'format cells - number - date ' option to do so. Pick the format: YYYYDDD. So (#4) mike's DOH is: 1981022. So, say cell A4 is DOH and cell B4 is today's date. (All of column B is the same - B1, B2, B3...etc. is today's date.) Senority is column C4. Forumla for cell C4is: =B4- A4. Propegate that forumla across the whole spreadsheet, as in C1 = B1 - A1, C2 = B2 - A2...and so on. You can use the cut/paste function for this - it will automatically change the row number. In Mike's case, cell C4 turns out to be (2006073 - 1981022) = 25051. Sort by Column C and voila - you have your employees ordererd by senority. Note: you can use today's date, or the date one day after your most recent hire - senority order won't change, just the number will increase or decrease depending on the date you use in column C (I suggest you use today's date, and when you need to redo the spreadsheet, update it with the current date) -Z.
__________________
2010 Cayman S - 12-2020 - 2014 MINI Cooper S Coupe - 05-17 - 05-21 1989 944S2 - 06-01 - 01-14 Carpe Viam. <>< |
||
|
|
|
|
Moderator
|
Z - it's not that hard. Let Excel do the date match, use variables so you don't have to propagate anything, use an IF function to time out the old pilots.
__________________
Don Plumley M235i memories: 87 911, 96 993, 13 Cayenne |
||
|
|
|
|
Moderator
|
Quote:
-Z
__________________
2010 Cayman S - 12-2020 - 2014 MINI Cooper S Coupe - 05-17 - 05-21 1989 944S2 - 06-01 - 01-14 Carpe Viam. <>< |
||
|
|
|
|
|
Moderator
|
Here, I'll post the formulas:
offset_date = cell where you enter the number of future years, could be zero, could be 5, etc. offset is "=(TODAY()+(offset_date*365))" service is "(offset-D8)/365" where D8 is the relative cell for date of hire too_old is "=IF((offset-E8)/365<=60,0,-999)" where E8 is the relative cell for the date of birth service sort is service + too_old Sort on "service sort" Unfortunately, it does not take leap years into account. I'll have to work on that...
__________________
Don Plumley M235i memories: 87 911, 96 993, 13 Cayenne |
||
|
|
|
|
Moderator
|
Will Julian dates help with the leap year problem?? (non-programming background)
__________________
Don Plumley M235i memories: 87 911, 96 993, 13 Cayenne |
||
|
|
|
|
Moderator
|
Quote:
-Z.
__________________
2010 Cayman S - 12-2020 - 2014 MINI Cooper S Coupe - 05-17 - 05-21 1989 944S2 - 06-01 - 01-14 Carpe Viam. <>< |
||
|
|
|
|
Moderator
|
Quote:
Note: you cannot use the "Z-man J-date result" to show anything but order of seniority. You can't really divide that number by anything to get a 'years of service' or anything else. To do that, you'd have to split apart the Jdate into years and days, and do calculations based on those two separate numbers. -Z
__________________
2010 Cayman S - 12-2020 - 2014 MINI Cooper S Coupe - 05-17 - 05-21 1989 944S2 - 06-01 - 01-14 Carpe Viam. <>< |
||
|
|
|
|
Moderator
|
Quote:
__________________
Don Plumley M235i memories: 87 911, 96 993, 13 Cayenne |
||
|
|
|
|
Moderator
|
Quote:
-Z
__________________
2010 Cayman S - 12-2020 - 2014 MINI Cooper S Coupe - 05-17 - 05-21 1989 944S2 - 06-01 - 01-14 Carpe Viam. <>< |
||
|
|
|
|
Moderator
|
No, Mark comes before Chris. Mark is #5, Chris is #6. The other figures are random employee numbers.
The DOB only figures into the time-out (over 60 factor).
__________________
Don Plumley M235i memories: 87 911, 96 993, 13 Cayenne |
||
|
|
|
|
Moderator
|
Quote:
Actually, if you just sort the list by DOH, you'll have them all in seniority order! -Z.
__________________
2010 Cayman S - 12-2020 - 2014 MINI Cooper S Coupe - 05-17 - 05-21 1989 944S2 - 06-01 - 01-14 Carpe Viam. <>< |
||
|
|
|
|
Moderator
|
Double post.
Man, I've having a bad day... already... -Z.
__________________
2010 Cayman S - 12-2020 - 2014 MINI Cooper S Coupe - 05-17 - 05-21 1989 944S2 - 06-01 - 01-14 Carpe Viam. <>< |
||
|
|
|
|
Registered
|
snake, what is your email? i will send you my simple one.
you will be able to rank either by number of years service or age. the data>sort>decending button is your friend
__________________
poof! gone |
||
|
|
|
|
Moderator
|
I improved my quick and dirty version to include a control button that invokes the sorting macro. Simply enter the years in the future you wish to determine the seniority, and press the button "Rank".
For those interested, the spreadsheet is posted here.
__________________
Don Plumley M235i memories: 87 911, 96 993, 13 Cayenne |
||
|
|
|
|
Insert Tag Line HERE.....
|
don, looks like you re getting there!!. Now i need a cell, that will add up the people. or better yet, i just sent it to you.
Thanks!
__________________
Marc |
||
|
|
|
|
|
Registered
|
very similar to the one i cranked out. nice, don!
__________________
poof! gone |
||
|
|
|
|
Moderator
|
You should see the one I just cranked out....
Used the Seniority Number to find the person, then took advantage of the "Match" function to determine the rank more directly. Then had to figure out VB code to run a button on a different sheet. Now to figure out how to count the valid pilots and tell someone if they are too old... Edit: Got it. Did that with the CountIF function....
__________________
Don Plumley M235i memories: 87 911, 96 993, 13 Cayenne Last edited by Don Plumley; 03-15-2006 at 04:02 PM.. |
||
|
|
|