Re: RANGE Until VALUE"XXX" Changes to "YYY"
Hello again...
I'll try to explain this in another way (as everybody can see English is not my first language...)
John is a simple robot-farmer. He performs just two tasks: working and sleeping.
When John is awake he picks up strawberries in his field. When he's asleep the wild birds eat them.
John gets tired quite randomly: sometimes he can work for 14 hours in a row or more, sometimes he falls asleep after one or two hours.
In column A you find the number of strawberries picked up by John (when he's awake) or eaten by the birds (when John's asleep).
Column B shows when John is awake.
A B
133 sleepin'
234 sleepin'
342 awake
571 awake
345 awake
343 sleepin'
234 sleepin'
564 sleepin'
323 sleepin'
234 awake
113 awake
123 sleepin'
...
(in this example: during the last 12 hours, John slept for two hours, then he worked for 3 hours and fell asleep again for 4. He woke up and worked for two more hours, and then fall asleep again).
John needs a formula to tell him (every time that he falls asleep) how many strawberries he picked since he's last awakening.
(in the example, the formula should give 342+571+345 when John falls asleep the first time, and 234+113 when John falls asleep the second time.)
Please help!
Thanks a lot!
kant (and John)