Forum Discussion

j-snowd's avatar
j-snowd
Copper Contributor
Feb 20, 2025

Excel formula for a running balance with a minimum and maximum balace

Hi all,

I am trying to create a graph displaying the water level in a tank. The tank is fed from rain which is collected on a roof.

For my data, I have a table of rainfall at a given location. I want to create a formula to subtract 100 litres from the tank every day there is water in the tank. Obviously, the tank cannot have negative litres of water, so once the tank is empty, 0 litres will be removed from it until it rains. 

The tank capacity is 50,000 litres, so balances over this level would also be wasted and not add to the total. 

Column G shows the tank level before any water has been removed (ie. rainfall in mm * 100m square roof.)

Each row represents a day. For each day, we remove 100 litres of water.

Can anyone suggest ways to structure this data or formulas that yeild a daily running balance of water in the tank?

So far, I have struggled to overcome the issue of negative balances appearing during periods of 0 rainfall.

Thanks for any help you can give. 

Resources