#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 23
Default Date comparision

Hi
I have a simple problems that is hopefully easy to answer.
is it possible to compare two dates eg =if(27/03/2006 < 13/10/2006,....)
if so can someone please advise.
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default Date comparision

Hi Murray

Try either
IF(DATE(2006,3,27)<DATE(2006,10,13), value_if_true,value_if_false)
or
IF(--"27/03/06"<--"13/10/06", value_if_true,value_if_false)

--
Regards

Roger Govier


"Murray" wrote in message
...
Hi
I have a simple problems that is hopefully easy to answer.
is it possible to compare two dates eg =if(27/03/2006 <
13/10/2006,....)
if so can someone please advise.
Thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Date comparision

You could also try

IF(cell_ref1<cell_ref2,value_if_true,value_if_fals e)

This is possible as excell converts dates to numbers in the background

Brendan

"Roger Govier" wrote:

Hi Murray

Try either
IF(DATE(2006,3,27)<DATE(2006,10,13), value_if_true,value_if_false)
or
IF(--"27/03/06"<--"13/10/06", value_if_true,value_if_false)

--
Regards

Roger Govier


"Murray" wrote in message
...
Hi
I have a simple problems that is hopefully easy to answer.
is it possible to compare two dates eg =if(27/03/2006 <
13/10/2006,....)
if so can someone please advise.
Thanks




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Date comparision

If all you want to do is compare a date in one cell to a date in another
cell, just do a value comparison. Dates are stored as a numerical value.

If Range("A1").Value < Range("A2").Value Then
<date in A1 is before date in A2
Else
<date in A1 is same as or after date in A2
End If
"Murray" wrote:

Hi
I have a simple problems that is hopefully easy to answer.
is it possible to compare two dates eg =if(27/03/2006 < 13/10/2006,....)
if so can someone please advise.
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
IF and Date Functions Christ4 Excel Worksheet Functions 3 August 11th 06 04:18 AM
insert date Larry Excel Worksheet Functions 28 July 15th 06 02:41 AM
Insert Automatic, Non-Updating Date Stamp Ken Zenachon Excel Discussion (Misc queries) 8 January 18th 06 06:52 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
Another Date issue. TimM Excel Worksheet Functions 1 November 17th 05 01:58 AM


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