Excel Sum Until Value Reached

Source: i.stack.imgur.com