count between a date range

D

Dave

Hi, I want to be able to count between a date range and return the value yes.
I will show you the formula I currently have:

=IF(M2>=DateCell-365,"Yes","No")

This gives a yes if the date is greater than the date in M2 minus 365. This
however cincludes all the dates beyond M2 which isnt what I want. I want the
dates upto M2. If that makes sense? Any help would be greatly appreciated

Thanks
 
D

Dave

Hi

This does not work. It counts a year back plus one month and gives a yes to
dates beyond the date in M2. So it doesnt work. I have tried to manipulate it
but to no avail!?

Thanks
 
J

Jacob Skaria

Probably lost here...Can you post back with samples and the expected results...
 
D

Dave

OK. I have a number of dates in column a from 01/11/2007 to 01/06/2010. I
would like to mark the ones which are one year before the date shown in a
seperate sheet. So if the date shown is 01/02/2010, I would like the formula
to mark every row with a date inbetween 01/02/2009 and the 01/02/2010.
Nothing before or after. Does that make sense?

Thanks
 
R

Roger Govier

Hi Dave

Try
=IF(AND(M2<=datecell,
M2>=DATE(YEAR(datecell)-1,MONTH(datecell),DAY(datecell))),"Yes","No")

--

Regards
Roger Govier

Dave said:
OK. I have a number of dates in column a from 01/11/2007 to 01/06/2010. I
would like to mark the ones which are one year before the date shown in a
seperate sheet. So if the date shown is 01/02/2010, I would like the
formula
to mark every row with a date inbetween 01/02/2009 and the 01/02/2010.
Nothing before or after. Does that make sense?

Thanks



__________ Information from ESET Smart Security, version of virus
signature database 5165 (20100602) __________

The message was checked by ESET Smart Security.

http://www.eset.com

__________ Information from ESET Smart Security, version of virus signature database 5165 (20100602) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 
D

Dave

Thats great! Thank you! I do have one more question. Should I open another
post?

Thanks
David
 
J

Jacob Skaria

If it is not relevant or a continuation to this post then it is better to
open a new post so that contributors can have a go at it as long as the
status remains unanswered....
 
D

Dave

This works just as well! Thanks alot!

Roger Govier said:
Hi Dave

Try
=IF(AND(M2<=datecell,
M2>=DATE(YEAR(datecell)-1,MONTH(datecell),DAY(datecell))),"Yes","No")

--

Regards
Roger Govier



__________ Information from ESET Smart Security, version of virus signature database 5165 (20100602) __________

The message was checked by ESET Smart Security.

http://www.eset.com



.
 

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