In column A I have a unique location, column B are all present zones in each unique location, column C is the thickness of each zone, column D is distance to/from payzone top from the top of each zone. The last zone in each location does not have a defined thickness and isn't necessary. Payzone always has a thickness, but will be defined as 0 in column D to reference the top of the payzone. Is there a formula that I could use in column D to populate the distances for each unique location, like I have defined below? Perhaps identifying each location then looking for first negative value, defining it as 0 and then summing values until it reaches the next location? Any help would be greatly appreciated.
<tbody>
</tbody>
Location A | Zone 1 | 32 | 156 |
Location A | Zone 2 | 116 | 124 |
Location A | Zone 3 | 8 | 8 |
Location A | Payzone | -9 | 0 |
Location A | Zone 4 | -8 | -9 |
Location A | Zone 5 | -17 | |
Location B | Zone 1 | 9 | 9 |
Location B | Payzone | -10 | 0 |
Location B | Zone 2 | -2 | -12 |
Location B | Zone 3 | -3 | -15 |
<tbody>
</tbody>