LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel & dates... how to determine order.

If you have formatted your columns as dates then the contents are jus
numbers (try one cell - Copy/Edit Paste Special Values).

You therefore use them the same as any other number
eg. IF(A1<B1,1,0)
To use a hard coded date in the comparison formula it needs to be se
to a number :-
eg. =IF(A1DATEVALUE("1/1/92"),"After","Before")
=IF(YEAR(A1)<1992,"Before","After")

This is duplicated in code by If ....Then ... Else ..

Beware. VBA changes hard coded dates to the American format "mm/dd/yy"
especially if you use
MyDate=#31/1/92#
("it's a feature, not a bug" <grin)
so you may need to ensure that you use something like .....
MyDate=Format("1/1/92","dd/mm/yy"

--
Message posted from http://www.ExcelForum.com

 
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
Take one sales order and compare all ship dates for that order. Mudassir Ahmed Excel Discussion (Misc queries) 1 September 21st 09 07:28 PM
Need to determine the elapsed Minutes between 2 dates in excel EasyButton Excel Worksheet Functions 3 August 20th 07 04:28 PM
How do I determine which order to use in a polynomial trendline? Nina Charts and Charting in Excel 1 January 25th 07 05:58 PM
How does Excel determine the ORDER of consolidated data? JB Excel Worksheet Functions 0 July 25th 06 10:19 PM
how do I link purchase order dates from one excel workbook to ano. LeLe123 Excel Worksheet Functions 1 September 2nd 05 03:55 PM


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