Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Date Question

Thanks

"Mike H" wrote:

Hi,

=IF(DATE(YEAR(A2),MONTH(A2)+B2,DAY(A2))<TODAY()
,"Out of Contract"
,"")

The formula has 3 parts which are split above onto 3 lines.
Part 1. Adds the value in B2 in months to the date in A2 and checks if is
earlier (<) than today. You can do a simple mathmatical < comparison with
dates because they are actually stored as numbers. Change the format of a
cell with a date in to general and see what happens.

Part 2 is what to display if part 1 is TRUE
Part 3 is what to do if part 1 is false which in this case is "" or nothing.

Mike


"millwalll" wrote:

Hi thanks dont supose you could explain it to me of what each bit does thanks

"Mike H" wrote:

Hi,

Contract start date In A2
Length of contract in months in B2
This in C2
=IF(DATE(YEAR(A2),MONTH(A2)+B2,DAY(A2))<TODAY(),"O ut of Contract","")

Mike

"millwalll" wrote:

Hi all,
I have a date for example 23/10/07 then I have a contract length let say 18.
I need to add that to the date and if the new date is less than the
current date I need a cell to dispaly Out contract

Many thanks

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
Date question M Thompson Excel Discussion (Misc queries) 4 June 8th 09 11:41 AM
Date Question Ben Excel Programming 2 December 12th 07 05:01 PM
Date Question John Excel Discussion (Misc queries) 4 January 15th 06 06:33 PM
Date question Greg B[_4_] Excel Programming 9 March 25th 05 02:28 AM
date question david Excel Programming 1 July 23rd 03 09:50 PM


All times are GMT +1. The time now is 05:26 AM.

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"