ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Comparing dates (https://www.excelbanter.com/excel-worksheet-functions/225536-comparing-dates.html)

Gareth.Evans

Comparing dates
 
Hi all thankyou fro you help, i am trying to compare to dates and say
weather one is higher then the other. my formulas below work on one
worksheet but not another, and i am at a complete loss as to why?

A1 - 13/03/2009 as date
A2 - calculates 21/03/2009 by DATE(YEAR(CJ6),MONTH(CJ6)+1,DAY(CJ6)+20)
A3 - calculates "No" by IF(A1<A2,"Yes","No")

Clearly A1 is smaller then A2 so A3 should be equal to "Yes" and not
"No"

This is completely doing my head in, hope you can help

Roger Govier[_3_]

Comparing dates
 
Hi Gareth

Works fine for me.
I assume you have 01 Feb 2009 in cell CJ6

--
Regards
Roger Govier

"Gareth.Evans" wrote in message
...
Hi all thankyou fro you help, i am trying to compare to dates and say
weather one is higher then the other. my formulas below work on one
worksheet but not another, and i am at a complete loss as to why?

A1 - 13/03/2009 as date
A2 - calculates 21/03/2009 by DATE(YEAR(CJ6),MONTH(CJ6)+1,DAY(CJ6)+20)
A3 - calculates "No" by IF(A1<A2,"Yes","No")

Clearly A1 is smaller then A2 so A3 should be equal to "Yes" and not
"No"

This is completely doing my head in, hope you can help



Gareth.Evans

Comparing dates
 
On Mar 25, 6:48*pm, "Roger Govier"
<roger@technology4unospamdotcodotuk wrote:
Hi Gareth

Works fine for me.
I assume you have 01 Feb 2009 in cell CJ6

--
Regards
Roger Govier

"Gareth.Evans" wrote in message

...

Hi all thankyou fro you help, i am trying to compare to dates and say
weather one is higher then the other. my formulas below work on one
worksheet but not another, and i am at a complete loss as to why?


A1 - 13/03/2009 as date
A2 - calculates 21/03/2009 by DATE(YEAR(CJ6),MONTH(CJ6)+1,DAY(CJ6)+20)
A3 - calculates "No" by IF(A1<A2,"Yes","No")


Clearly A1 is smaller then A2 so A3 should be equal to "Yes" and not
"No"


This is completely doing my head in, hope you can help


i have 01/02/09 in CJ6, could it have something to do with the way it
is formatted?

Roger Govier[_3_]

Comparing dates
 
Hi
No, the formatting should make no difference.
I merely wrote the date in that way so there could be no confusion with
English or American date formats.
Providing your formula in cell A2 does return a date, and the Year is 2009
(09), then it should work.
As, I said, it works fine for me.

--
Regards
Roger Govier

"Gareth.Evans" wrote in message
...
On Mar 25, 6:48 pm, "Roger Govier"
<roger@technology4unospamdotcodotuk wrote:
Hi Gareth

Works fine for me.
I assume you have 01 Feb 2009 in cell CJ6

--
Regards
Roger Govier

"Gareth.Evans" wrote in message

...

Hi all thankyou fro you help, i am trying to compare to dates and say
weather one is higher then the other. my formulas below work on one
worksheet but not another, and i am at a complete loss as to why?


A1 - 13/03/2009 as date
A2 - calculates 21/03/2009 by DATE(YEAR(CJ6),MONTH(CJ6)+1,DAY(CJ6)+20)
A3 - calculates "No" by IF(A1<A2,"Yes","No")


Clearly A1 is smaller then A2 so A3 should be equal to "Yes" and not
"No"


This is completely doing my head in, hope you can help


i have 01/02/09 in CJ6, could it have something to do with the way it
is formatted?




All times are GMT +1. The time now is 02:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com