Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Hugh@cat
 
Posts: n/a
Default What is the syntax to check if a date occurred before a referance.

I am trying to check a column of dates against a reference date to determine
if the dates occurred before the reference date. I am using the following
logical expression:

IF(A1<"01-Jan-2004", "True","False")

column A contains dates like:

01-Feb-2004

The expression provides the correct answer for some dates and the incorrect
answer for others. Anyone know the correct syntax for this expression?
  #2   Report Post  
N Harkawat
 
Posts: n/a
Default

use this instead
=IF(A1<DATEVALUE("01-Jan-2004"), "True","False")

"Hugh@cat" wrote in message
...
I am trying to check a column of dates against a reference date to
determine
if the dates occurred before the reference date. I am using the following
logical expression:

IF(A1<"01-Jan-2004", "True","False")

column A contains dates like:

01-Feb-2004

The expression provides the correct answer for some dates and the
incorrect
answer for others. Anyone know the correct syntax for this expression?



  #3   Report Post  
jake
 
Posts: n/a
Default

that looks like it should work. it may help if you convert your date format
to a fully numeric one eg 01/02/04 as the formula you have used may not be
able to parse alphanumeric data


"Hugh@cat" wrote:

I am trying to check a column of dates against a reference date to determine
if the dates occurred before the reference date. I am using the following
logical expression:

IF(A1<"01-Jan-2004", "True","False")

column A contains dates like:

01-Feb-2004

The expression provides the correct answer for some dates and the incorrect
answer for others. Anyone know the correct syntax for this expression?

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 and time ladimples247 New Users to Excel 2 February 16th 05 09:52 PM
Date issue between Windows and Macintosh version dlg1967 Excel Discussion (Misc queries) 4 January 19th 05 04:51 PM
Syntax to check protected status of a worksheet? [email protected] Excel Discussion (Misc queries) 2 January 18th 05 03:53 PM
Need help troubleshooting an array formula XLXP on Win2K KR Excel Worksheet Functions 1 December 13th 04 08:41 PM
Using formulas to determine date in one cell based on date in anot Gary Excel Worksheet Functions 2 November 22nd 04 09:11 AM


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