Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Ian Ian is offline
external usenet poster
 
Posts: 109
Default 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?


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 376
Default 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?


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default 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?

  #5   Report Post  
Posted to microsoft.public.excel.misc
Ian Ian is offline
external usenet poster
 
Posts: 109
Default 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?


.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 376
Default 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?

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default 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?


  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default 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?


.


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
Format date dd.mm.yyyy to dd/mm/yyyy Kiwi User Excel Discussion (Misc queries) 7 May 7th 23 11:44 AM
change date format from dd/mm/yyyy to mm/yyyy flow23 Excel Discussion (Misc queries) 3 April 4th 23 11:26 AM
change date format dd/mm/yyyy to Julian date format? itzy bitzy Excel Worksheet Functions 1 December 8th 09 07:42 PM
Help with date format mm/dd/yyyy vs. dd/mm/yyyy Dream Excel Discussion (Misc queries) 3 September 10th 09 07:33 PM
how do I change date from mm/dd/yyyy to dd:mm:yyyy format in Excel Jack Wilson New Users to Excel 4 July 18th 06 01:57 PM


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