I've got the below tables.
What I need to do is have a VLOOKUP/LOOKUP statement which looks a the month under 'Compare' and tells me if that month is included under the column 'Month,' If it is, then look at Sent and Paid. If both columns have Yes in then then return Yes, otherwise return the value in the Paid column.
It does however need to check if say 1st Feb is inbetween the months, so in this example, if 1st Feb is between 1st Jan and March, use the data from Jan. At the moment I am doing this using a combination of VLOOKUP and LOOKUP:
=VLOOKUP(LOOKUP(I21,$L$4:$L$15),$L$4:$Q$15,6,FALSE)
I21 is the "Compare" month, L4-L15 is the "Month" column, L4-Q15 is the full range up to Sent, and 6 is for the Sent column. At the moment I am not included the Paid column which I need to do as explained above.
Month Sent? Paid?
1st Jan Yes Yes
1st Mar Yes No
1st Jun No No
1st Oct N/A N/A
Compare
1st Jan
1st Feb
1st Mar
...
1st Jun