![]() |
Date formula and if function
I need some help using the date and if functions. I need to add one year to a
date(hire date) and then if the result is earlier than a date I have input in another cell (end of pay period), then the returning result should be hire date plus one year. But if the hiredate plus one yearis after the entered date (end of pay period), then I need the result to be the entered date (end of payperiod). Does that make sense? |
Date formula and if function
In A1 put the hire date
In A2 put end of pay period In A3 enter: =DATE(YEAR(A1)+1,MONTH(A1),DAY(A1)) this will be one year past the hire date in A4 enter: =IF(A3<A2,A3,A2) your desired formula -- Gary's Student "alane" wrote: I need some help using the date and if functions. I need to add one year to a date(hire date) and then if the result is earlier than a date I have input in another cell (end of pay period), then the returning result should be hire date plus one year. But if the hiredate plus one yearis after the entered date (end of pay period), then I need the result to be the entered date (end of payperiod). Does that make sense? |
Date formula and if function
Is there a way that I can combine both of those functions (the one in A3 and
the one in A4) in A3...so that there is only one result? "Gary''s Student" wrote: In A1 put the hire date In A2 put end of pay period In A3 enter: =DATE(YEAR(A1)+1,MONTH(A1),DAY(A1)) this will be one year past the hire date in A4 enter: =IF(A3<A2,A3,A2) your desired formula -- Gary's Student "alane" wrote: I need some help using the date and if functions. I need to add one year to a date(hire date) and then if the result is earlier than a date I have input in another cell (end of pay period), then the returning result should be hire date plus one year. But if the hiredate plus one yearis after the entered date (end of pay period), then I need the result to be the entered date (end of payperiod). Does that make sense? |
Date formula and if function
Su
A3=IF(DATE(YEAR(A1)+1,MONTH(A1),DAY(A1))<A2,DATE(Y EAR(A1)+1,MONTH(A1),DAY(A1)),A2) "alane" wrote: Is there a way that I can combine both of those functions (the one in A3 and the one in A4) in A3...so that there is only one result? "Gary''s Student" wrote: In A1 put the hire date In A2 put end of pay period In A3 enter: =DATE(YEAR(A1)+1,MONTH(A1),DAY(A1)) this will be one year past the hire date in A4 enter: =IF(A3<A2,A3,A2) your desired formula -- Gary's Student "alane" wrote: I need some help using the date and if functions. I need to add one year to a date(hire date) and then if the result is earlier than a date I have input in another cell (end of pay period), then the returning result should be hire date plus one year. But if the hiredate plus one yearis after the entered date (end of pay period), then I need the result to be the entered date (end of payperiod). Does that make sense? |
Date formula and if function
Try this =MIN(EDATE(A1,12),A2) -- daddylonglegs ------------------------------------------------------------------------ daddylonglegs's Profile: http://www.excelforum.com/member.php...o&userid=30486 View this thread: http://www.excelforum.com/showthread...hreadid=505874 |
All times are GMT +1. The time now is 05:23 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com