Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Paula
 
Posts: n/a
Default Comparing dates in an IF function

Could someone kindly give me some guidance on the below:

I have two columns, one a list of dates, and the other which is supposed to
show a 'Y' if the date in the same row is prior to a certain date e.g. 3rd
January 2005, and an 'N' if not.

My formula looks like this, but doesn't seem to work:

=IF(G2<03/01/2005,"Y","N") Any thoughts? TIA
  #2   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi

=IF(G2<DATE(2005,1,3),"Y","N")

--
When sending mail, use address arvil<attarkon.ee
Arvi Laanemets


"Paula" wrote in message
...
Could someone kindly give me some guidance on the below:

I have two columns, one a list of dates, and the other which is supposed

to
show a 'Y' if the date in the same row is prior to a certain date e.g. 3rd
January 2005, and an 'N' if not.

My formula looks like this, but doesn't seem to work:

=IF(G2<03/01/2005,"Y","N") Any thoughts? TIA



  #3   Report Post  
RagDyeR
 
Posts: n/a
Default

It's usually easier to designate a cell to hold the date you're looking for,
so that it can be changed much more simply for future calculations.

Also, using true XL dates, you don't have to worry about matching formats
between the formula and the data.

Try this:

=IF(G2<A1,"Y","N")

With the date you're looking for entered in A1.
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"Paula" wrote in message
...
Could someone kindly give me some guidance on the below:

I have two columns, one a list of dates, and the other which is supposed to
show a 'Y' if the date in the same row is prior to a certain date e.g. 3rd
January 2005, and an 'N' if not.

My formula looks like this, but doesn't seem to work:

=IF(G2<03/01/2005,"Y","N") Any thoughts? TIA


  #4   Report Post  
David Jessop
 
Posts: n/a
Default

Hi,

The problem is that Excel is helpfully converting 03/01/2005 to a number
(probably 3/2005). If you try

=IF(G2<datevalue("03/01/2005"),"Y","N")

if should work.

David Jessop

"Paula" wrote:

Could someone kindly give me some guidance on the below:

I have two columns, one a list of dates, and the other which is supposed to
show a 'Y' if the date in the same row is prior to a certain date e.g. 3rd
January 2005, and an 'N' if not.

My formula looks like this, but doesn't seem to work:

=IF(G2<03/01/2005,"Y","N") Any thoughts? TIA

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
Formating Dates for production schedule dpl7579 Excel Discussion (Misc queries) 1 January 11th 05 08:43 PM
if function with dates Brad Excel Discussion (Misc queries) 1 January 10th 05 10:49 PM
Nested IF Function, Date Comparing, and NetworkDays Function carl Excel Worksheet Functions 2 December 29th 04 09:57 PM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM
change function variable prompts?? thinkingfield Excel Worksheet Functions 1 November 8th 04 04:01 PM


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