Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Simone
 
Posts: n/a
Default how do I use if formula using dates?

I need use the if function to do the following:
if the hire date is greater than 9/30/2005, then the date should be
2/1/2006, otherwise the date should be 1/1/2006.

I have been using the following, if(A59/30/2005, 2/1/2006, 1/1/2006), but
it changes every date to 1/1/2006 including dates greater than 9/30/2005.

Please help!
  #2   Report Post  
Rowan Drummond
 
Posts: n/a
Default how do I use if formula using dates?

You could try:
=IF(A5DATEVALUE("09/30/2005"),DATEVALUE("2/1/2006"),DATEVALUE("1/1/2006"))
format result as Date

Hope this helps
Rowan

Simone wrote:
I need use the if function to do the following:
if the hire date is greater than 9/30/2005, then the date should be
2/1/2006, otherwise the date should be 1/1/2006.

I have been using the following, if(A59/30/2005, 2/1/2006, 1/1/2006), but
it changes every date to 1/1/2006 including dates greater than 9/30/2005.

Please help!

  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default how do I use if formula using dates?

ANother way

=--"2006-01-01"+(A5--"2005-09-30")

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Simone" wrote in message
...
I need use the if function to do the following:
if the hire date is greater than 9/30/2005, then the date should be
2/1/2006, otherwise the date should be 1/1/2006.

I have been using the following, if(A59/30/2005, 2/1/2006, 1/1/2006), but
it changes every date to 1/1/2006 including dates greater than 9/30/2005.

Please help!



  #4   Report Post  
Dave Peterson
 
Posts: n/a
Default how do I use if formula using dates?

I like:

=if(a5date(2005,9,30),date(2006,2,1),date(2006,1, 1))

Then I don't have to worry about any settings on any pc.

But you were really checking to see if:
A5 was greater than 9 divided by 30 divided by 2005.

(9/30/2005 looks more like an arithmetic (division) than a date to excel.)



Simone wrote:

I need use the if function to do the following:
if the hire date is greater than 9/30/2005, then the date should be
2/1/2006, otherwise the date should be 1/1/2006.

I have been using the following, if(A59/30/2005, 2/1/2006, 1/1/2006), but
it changes every date to 1/1/2006 including dates greater than 9/30/2005.

Please help!


--

Dave Peterson
  #5   Report Post  
Dave Peterson
 
Posts: n/a
Default how do I use if formula using dates?

I think that that original expression was mdy, though. (well, if I can trust
that all were like 9/30/2005.)

Bob Phillips wrote:

ANother way

=--"2006-01-01"+(A5--"2005-09-30")

--

HTH

RP
(remove nothere from the email address if mailing direct)

"Simone" wrote in message
...
I need use the if function to do the following:
if the hire date is greater than 9/30/2005, then the date should be
2/1/2006, otherwise the date should be 1/1/2006.

I have been using the following, if(A59/30/2005, 2/1/2006, 1/1/2006), but
it changes every date to 1/1/2006 including dates greater than 9/30/2005.

Please help!


--

Dave Peterson
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 to give 5%rise in a figure if it occurs b/wn 2 dates lwhat Excel Worksheet Functions 1 October 28th 05 11:21 AM
Can someone help with a formula to calculate dates? SharonP. Excel Discussion (Misc queries) 11 August 9th 05 01:47 PM
Formula for Continuous Services Dates pvbridges Excel Worksheet Functions 1 June 19th 05 01:51 AM
Formula including dates R L Sandel Excel Worksheet Functions 2 May 25th 05 12:30 PM
How do I format dates accessed by a formula Mont22 Excel Discussion (Misc queries) 2 January 12th 05 04:09 PM


All times are GMT +1. The time now is 09:44 AM.

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"