« first day (6 days earlier)      last day (16 days later) » 

00:03
MRC-17 rows 8, 9 are a match with 420-430 of Y
MRC-17 rows 10, 11 match with 430-440 of Y
MRC-15 row 18 is a match with 120-125 of Y
MRC-15 rows 19, 20, 21 are a match with 125-140 of Y
cause the 5+5+5 = 15 = 125-140 = 15
does that make sense?
 
7 hours later…
07:29
Yes. But the next part was that you said because of RM missing in MRC-17 rows 4, 5 - you don't want it to be considered a match.
As 400-410 is the interval (x), and 400-420 is the interval in df2 (y)
07:43
"if df1 (x) is missing in MRC-17 from 420-430, I see I have a 420-430 that matches in df2 (y) so I want to replace but in MRC-17 from 400-405 and 405-410 RM_x is missing, I don't have 400-410 interval in df2 (y), I have a 400-420 but I want it to equal the run of missing"
This is the rule I'm trying to extract from the table above ^^
 
11 hours later…
19:06
yeah for each variable it will have to do it for each to fill it, not use other rows to decide if it fills. Each is mutually exclusive
so for each variable don't look at what is missing in the other variables, run for 1 column then the next then the next

« first day (6 days earlier)      last day (16 days later) »