Hello all,
I have a Calc (4.2.4.2) sheet with these columns
| Date | B | T | P | D | L |
and, for each line, I have to search forward for the first line whose “D” value is equal or greater than B+T+P+D of the current line and then, in current line, L column, place the delta between the found line “Date” field and the current line “Date” field.
Example:
Date B T P D L
2014-05-01 8 4 2 10 HERE goes "26" because the first line with D >= "24" is on 2014-05-28.
2014-05-02 7 4 1 10 21 (2014-05-23)
2014-05-03 7 4 1 10 20 (same 2014-05-23)
2014-05-04 7 4 1 10 19 (still 2014-05-23)
2014-05-05 7 4 0 10 18
2014-05-06 7 4 0 10 17
2014-05-07 7 4 0 10 16
2014-05-08 7 4 4 11 19 (2015-05-28)
2014-05-09 7 4 2 15 19
2014-05-10 7 4 2 15 AND
2014-05-11 6 4 2 15 SO
2014-05-12 8 5 3 15 FORTH
2014-05-13 8 5 4 15 FOR
2014-05-14 9 6 3 16 EACH
2014-05-15 9 6 3 16 SINGLE
2014-05-16 9 6 2 16 LINE
2014-05-17 8 5 3 17 TILL
2014-05-18 8 5 3 17 THE
2014-05-19 8 5 3 17 END
2014-05-20 9 4 2 18
2014-05-21 9 5 2 18
2014-05-22 11 3 3 20
2014-05-23 11 3 3 22
2014-05-24 10 3 3 23
2014-05-25 9 3 4 23
2014-05-26 10 4 3 23
2014-05-27 10 4 3 26
2014-05-28 9 4 3 28
Can you please help me? I’ve tried VLOOKUP but I’m not sure how to properly use it or if it’s the correct thing. Cant’ get a number out of it…