View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
RGB RGB is offline
external usenet poster
 
Posts: 7
Default Matching month part of date only

Hi

I am trying to write a formula which checks whether a specific date is
within a date range. I only need to match the month & year part of the date,
not the exact date.

i have this formula;

=IF(AND(C$1=A3,C$1<=B3),"yes","no")

an example of the kind of the kind of data i need it for looks like this;

e.g does the start/end date range fall into the specific months along the
top of the rows (jan, feb, mar etc)? - "Yes", or "no" (These dates are in UK
format!)

start date end date jan feb mar apr may jun
jul.....
22/2/6 1/5/6 no yes yes yes yes no
no
14/2/6 21/6/6 no yes yes yes yes yes
no

Only the month and year need to match. the day isnt important

Many thanks for your help