Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
alane
 
Posts: n/a
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default 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?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
alane
 
Posts: n/a
Default 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?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
BekkiM
 
Posts: n/a
Default 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?

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
daddylonglegs
 
Posts: n/a
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formula Problem - interrupted by #VALUE! in other cells!? Ted Excel Worksheet Functions 17 November 25th 05 05:18 PM
Conditional formula date Ron Rosenfeld Excel Worksheet Functions 1 October 25th 05 03:12 PM
Need to use IF formula with a Date cell Eric Mc Excel Worksheet Functions 2 June 8th 05 12:38 AM
referencing named formula using INDIRECT function [email protected] Excel Worksheet Functions 19 May 11th 05 09:48 AM
Using date function in an if statement M Smith Excel Worksheet Functions 2 March 30th 05 06:53 PM


All times are GMT +1. The time now is 06:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"