date difference in mm/yyyy format

I

Ian

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?
 
D

Dave Peterson

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")
 
F

Fred Smith

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

Regards,
Fred
 
I

Ian

only works if it's the same year?

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

Roger Govier

I quite agree!!
--
Regards
Roger Govier

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

Regards,
Fred
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top