Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default If functtion for date

Can anyone help me with getting the formula for the following :
If D3<31-12-07 then EXPIRY
IF 30-06-08D3<31-12-07 then NEAR EXPIRY
IF D330-06-08 then OK

Thanx in advance

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default If functtion for date

Not sure what your trying to do but it would be better to have your dates as
cell references but try this:-

=IF(D3<DATE(2007,12,31),"Expiry",IF(D3<DATE(2008,6 ,30),"Near
Expiry",IF(D3DATE(2008,6,30),"OK","Unspecified")) )

Mike

"Saket" wrote:

Can anyone help me with getting the formula for the following :
If D3<31-12-07 then EXPIRY
IF 30-06-08D3<31-12-07 then NEAR EXPIRY
IF D330-06-08 then OK

Thanx in advance

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,059
Default If functtion for date

On Dec 17, 6:22 am, Saket wrote:
Can anyone help me with getting the formula for the following :
If D3<31-12-07 then EXPIRY
IF 30-06-08D3<31-12-07 then NEAR EXPIRY
IF D330-06-08 then OK


Try:

=if(D3<datevalue("31-12-07"), "EXPIRY",
if(D3<datevalue("30-06-08"), "NEAR EXPIRY", "OK")

Note: I am assuming that DATEVALUE() conforms to your country's form
of dates (dd-mm-yy). If not, you might need to conform to DATEVALUE's
form, which is dd-mm-yy in my version. Other forms of date are also
allowed.
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default If functtion for date

Better to use DATE, rather than DATEVALUE, then you don't get the ambiguity
of definition.
--
David Biddulph

"joeu2004" wrote in message
...

Try:

=if(D3<datevalue("31-12-07"), "EXPIRY",
if(D3<datevalue("30-06-08"), "NEAR EXPIRY", "OK")

Note: I am assuming that DATEVALUE() conforms to your country's form
of dates (dd-mm-yy). If not, you might need to conform to DATEVALUE's
form, which is dd-mm-yy in my version. Other forms of date are also
allowed.


On Dec 17, 6:22 am, Saket wrote:
Can anyone help me with getting the formula for the following :
If D3<31-12-07 then EXPIRY
IF 30-06-08D3<31-12-07 then NEAR EXPIRY
IF D330-06-08 then OK



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
how to get the random date between the start date and the end date? Sebation Excel Worksheet Functions 3 October 13th 07 12:20 PM
Report Date - Date Recv = Days Late, but how to rid completed date MS Questionnairess Excel Worksheet Functions 1 January 24th 07 11:05 PM
Formula for determining if two date columns fall within specific date range Igottabeme Excel Worksheet Functions 2 April 21st 06 02:50 AM
Make date change in excel to current date when opening daily? jamie Excel Discussion (Misc queries) 3 March 1st 06 03:37 PM
Date updates from worksheet to chart & changes date to a date series! Help!! Jayjg Charts and Charting in Excel 2 January 22nd 05 03:00 PM


All times are GMT +1. The time now is 06:35 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"