LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default Using dates in IF statements

Works perfectly
Thanks much


"joeu2004" wrote:

On Jul 15, 2:08 pm, altah wrote:
I need to create a statement with the following criteria and response.
Please help.
[....]
If 7/15/07 1/2/02 + 5 years, then 5, otherwise 3.33


Does this do what you want?

=if(today() date(5+year(A1), month(A1), day(A1)), 5, 3.33)

where today() and A1 replace what you wrote as 7/15/07 and 1/2/02
respectively.

Note the difference between that and the following:

=if(datedif(A1, today(), "y") 5, 5, 3.33)

You decide which meets your intentions better.


 
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
IF statements with Dates Excel_Headache Excel Discussion (Misc queries) 5 May 2nd 07 11:42 PM
If Statements with Dates Erika Excel Discussion (Misc queries) 6 March 29th 07 11:28 AM
If statements and Dates Sue New Users to Excel 4 April 21st 06 05:02 PM
Dates in IF statements ScottEslick Excel Discussion (Misc queries) 8 January 20th 06 12:49 AM
if statements & dates? Lynn Excel Worksheet Functions 1 September 19th 05 04:19 PM


All times are GMT +1. The time now is 03:40 PM.

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

About Us

"It's about Microsoft Excel"