Count Inbetween dates

D

Dave

Hi

How do I show that a date in a row is inbetween a date. Say: I have a cell
called 'Datecell' and I want to count each row with a date in the past 12
months of this date. How would I do this? I originally had
=IF(DateCell-365<=E2,"Yes"). Although this counts everything in the past 12
months and gives it a 'Yes', it also counts everything after the date in the
'DateCell' and not inbetween the two dates.

Anyone know a solution?

Thanks
 
M

Mike H

Hi,

Try this

=SUMPRODUCT((A1:A100<=TODAY())*(A1:A100>=DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY()))))
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 
D

Dave

Hi Mike

I need the formula to return a Yes statement as in the previous formula so I
need =IF(DateCell-365<=E2,"Yes") but to count inbetween a date as opposed to
_365.

Thanks
 
F

Fred Smith

It's still unclear exactly what you want, but here's an example of how you
do "in between":
=IF(and(DateCell<E2,DateCell-365>E2),"Yes",false)

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