PDA

View Full Version : Excel Question


JeeberD
08-03-2015, 05:06 PM
OK, Excel gurus, I'm doing an amazingly fun I9 audit at work and would like to automate the process at least a little bit.

Once an employee is terminated, you have to retain their I9 for 3 years from their hire date or one year from their termination date...whichever is longer.

If I have one column with their hire date and the next column with their termination date, what would be the easiest way to have the next column show the date that the I9 needs to be retained until?

I'm pretty much an Excel n00b, so please go easy on me if there's a simple solution to this. I would Google it, like I usually do for Excel questions, put I'm not sure how to phrase it for a search.

Thanks in advance!

cartman
08-03-2015, 05:09 PM
check out the iif command. I think that is in Excel. (yes, that is two i's in the command)

edit: in Excel, I guess it is just 'if'

Ironhead
08-03-2015, 05:22 PM
Haven't tested this but it should work. Assuming the hire date is in cell B2 and the term date is in cell C2.

If the rule is measured in days:
=MAX(B2+(365.25*3),C2+365.25)


If the rule is measured strictly in calendar years:
=MAX(date(year(B2)+3,month(B2),day(B2)),date(year(C2)+1,month(C2),day(C2))


This will likely give you a number which is the way dates are really stored in excel. Just format the cell back to a date and you should be okay.

JeeberD
08-04-2015, 07:45 AM
Thank you both. Ironhead, that second forumula is exactly what I needed! I appreciate the help.