In column A I have a list of start dates
In column B I have a list of end dates
Column C onwards will be headed as sequential months & years i.e. Column C is headed Jan-06, Column D is Feb-06, Column E is Mar-06
Each row represents a person
In column C onwards I want to look at the header for each column and see if it lies between the data in column A & B. If it does I want to enter a 1, if it doesn’t I want to enter a zero
Example
=IF(AND(C1>=A2,C1<=B2),1,0)
So for example column C is for Jan-06. The formula then looks in A2 and says was the start date greater than or equal to Jan-06 and then looks in B2 and says was the end date less than or equal to Jan-06. If that’s the case a 1 appears, if not a zero.
Now the problem I have is the Jan-06, Feb-06, Mar-06 headers are being stored as 01/01/2006, 01/02/06, 01/03/06
Then, if the start date in column A is higher than that i.e. 02/01/2006, the formula returns a value of 0 but I want it to enter a 1.
Is there a way I can only look at the month and years in columns A&B and compare that to the month at the top of columns C, D, E etc
I’m sure there’s a basic solution but I’m going round in circles!