Thread: Date function
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Nitya Satheesh Nitya Satheesh is offline
external usenet poster
 
Posts: 41
Default Date function

On Thursday, May 28, 2015 at 12:17:25 PM UTC+5:30, Howard Silcock wrote:
On Wednesday, 27 May 2015 17:35:33 UTC+10, Nitya Satheesh wrote:
Hi,

I have 2 columns of dates , one being the start and the other the end. I need to find out if a certain month falls between a start and an end date..

This is what my data looks like .

Startdate Enddate May-11 Jun-11 July-11........dec-13
2/5/2011 6/10/2011
2/10/2011 6/1/2012
2/4/2011 6/12/2012

Now if may 11 falls in between any of the start or end date i need the cell to display "yes" and so on for each month.

Please help!
Thanks in advance!


If the start dates are in column A and the end dates are in column B and the dates across the top are in C1, D1, E1, ..., then enter this formula in cell C2 and then fill down and across:
=IF(AND(C$1=$A2, C$1<=$B2), "Yes", "No")

Howard


Hi Howard,

A problem I have with the formula you gave me is that if the start date is 12/5/2011 and the end date is 19/3/2012, it is diplaying "no" under may-11. I need it to display yes if May=11 is present in between the start date and end date. I'm not too worried about the dates, I just need the month. So if a month is present in between the start and end date I need that column to display "yes". What do I do ? Sorry if I haven't been able to explain it better.