#1   Report Post  
Karen Saberi
 
Posts: n/a
Default Dates in Excel

I want to use the "IF" function to allocate students to groups based on their
date of birth. I have tried doing this using the format

IF(D2<1/9/1994,"Secondary","Primary")

D2 is the cell with the first student's date of birth. I can't get the
result I want, as all students come out as "primary" regardless of their date
of birth, and even the first student was born in 1989.

Can anybody help?
  #3   Report Post  
Arvi Laanemets
 
Posts: n/a
Default

Hi

Try
=IF(D2<DATE(1994,9,1),"Secondary","Primary")

When this doesn't work, check values in column D - are they really dates?
Change cell format in column to numeric - when entries don't change to
numbers, then they are datestrings instead of dates.


Arvi Laanemets


"Karen Saberi" <Karen wrote in message
...
I want to use the "IF" function to allocate students to groups based on

their
date of birth. I have tried doing this using the format

IF(D2<1/9/1994,"Secondary","Primary")

D2 is the cell with the first student's date of birth. I can't get the
result I want, as all students come out as "primary" regardless of their

date
of birth, and even the first student was born in 1989.

Can anybody help?



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 do I calculate duration between two dates and times in excel? Robin CSM002 Excel Discussion (Misc queries) 3 May 13th 23 07:42 PM
Excel Range Value issue (Excel 97 Vs Excel 2003) Keeno Excel Discussion (Misc queries) 2 June 13th 05 02:01 PM
Ensure dates imported into Excel 2003 are shown in DD/MM/YYY form. KymY Excel Discussion (Misc queries) 3 February 11th 05 02:28 PM
dates in Excel 2003 [email protected] Excel Discussion (Misc queries) 3 January 4th 05 11:04 PM
how do I show dates in a column in an excel worksheet? papacradd Excel Discussion (Misc queries) 1 December 8th 04 02:33 PM


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