ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   date difference in mm/yyyy format (https://www.excelbanter.com/excel-discussion-misc-queries/258184-date-difference-mm-yyyy-format.html)

Ian

date difference in mm/yyyy format
 
I have two date colums
StartDate
ReadDate

I want to find all the readdates that are in months prior to the startdate

Eg if(readdate<startdate,"yes","no")

the problem is that if the readdate is in the same month (or any later date)
as the startdate I want a "no' returned. Is there any way to compare to
dates in a mm/yyyy format?



Roger Govier[_8_]

date difference in mm/yyyy format
 
Hi Ian

=if(Month(readdate)<month(startdate),"yes","no")
--
Regards
Roger Govier

Ian wrote:
I have two date colums
StartDate
ReadDate

I want to find all the readdates that are in months prior to the startdate

Eg if(readdate<startdate,"yes","no")

the problem is that if the readdate is in the same month (or any later date)
as the startdate I want a "no' returned. Is there any way to compare to
dates in a mm/yyyy format?



Dave Peterson

date difference in mm/yyyy format
 
If you entered the values as real dates (a month, a day and a year) and
formatted the cell to show mm/yyyy, then you could use:

=if(text(a1,"yyyymm")<text(b1,"yyyymm"),"yes","no" )



Ian wrote:

I have two date colums
StartDate
ReadDate

I want to find all the readdates that are in months prior to the startdate

Eg if(readdate<startdate,"yes","no")

the problem is that if the readdate is in the same month (or any later date)
as the startdate I want a "no' returned. Is there any way to compare to
dates in a mm/yyyy format?


--

Dave Peterson

Fred Smith[_4_]

date difference in mm/yyyy format
 
The problem with this formula is it doesn't support dates which are in
different years. Dave's is a better solution.

Regards,
Fred

"Roger Govier" wrote in message
...
Hi Ian

=if(Month(readdate)<month(startdate),"yes","no")
--
Regards
Roger Govier

Ian wrote:
I have two date colums
StartDate
ReadDate

I want to find all the readdates that are in months prior to the
startdate

Eg if(readdate<startdate,"yes","no")

the problem is that if the readdate is in the same month (or any later
date) as the startdate I want a "no' returned. Is there any way to
compare to dates in a mm/yyyy format?


Ian

date difference in mm/yyyy format
 
only works if it's the same year?

what if the dates are Dec 31, 2008 and Jan 1, 2009?



"Roger Govier" wrote:

Hi Ian

=if(Month(readdate)<month(startdate),"yes","no")
--
Regards
Roger Govier

Ian wrote:
I have two date colums
StartDate
ReadDate

I want to find all the readdates that are in months prior to the startdate

Eg if(readdate<startdate,"yes","no")

the problem is that if the readdate is in the same month (or any later date)
as the startdate I want a "no' returned. Is there any way to compare to
dates in a mm/yyyy format?


.


Roger Govier[_8_]

date difference in mm/yyyy format
 
I quite agree!!
--
Regards
Roger Govier

Fred Smith wrote:
The problem with this formula is it doesn't support dates which are in
different years. Dave's is a better solution.

Regards,
Fred

"Roger Govier" wrote in message
...
Hi Ian

=if(Month(readdate)<month(startdate),"yes","no")
--
Regards
Roger Govier

Ian wrote:
I have two date colums
StartDate
ReadDate

I want to find all the readdates that are in months prior to the
startdate

Eg if(readdate<startdate,"yes","no")

the problem is that if the readdate is in the same month (or any
later date) as the startdate I want a "no' returned. Is there any
way to compare to dates in a mm/yyyy format?


Teethless mama

date difference in mm/yyyy format
 
=IF(A1-DAY(A1)<B1-DAY(B1),"yes","no")


"Ian" wrote:

I have two date colums
StartDate
ReadDate

I want to find all the readdates that are in months prior to the startdate

Eg if(readdate<startdate,"yes","no")

the problem is that if the readdate is in the same month (or any later date)
as the startdate I want a "no' returned. Is there any way to compare to
dates in a mm/yyyy format?



Fred Smith[_4_]

date difference in mm/yyyy format
 
As I said, Dave's solution is better.

Regards,
Fred

"Ian" wrote in message
...
only works if it's the same year?

what if the dates are Dec 31, 2008 and Jan 1, 2009?



"Roger Govier" wrote:

Hi Ian

=if(Month(readdate)<month(startdate),"yes","no")
--
Regards
Roger Govier

Ian wrote:
I have two date colums
StartDate
ReadDate

I want to find all the readdates that are in months prior to the
startdate

Eg if(readdate<startdate,"yes","no")

the problem is that if the readdate is in the same month (or any later
date)
as the startdate I want a "no' returned. Is there any way to compare
to
dates in a mm/yyyy format?


.




All times are GMT +1. The time now is 04:45 PM.

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