"Laurr456" <(E-Mail Removed)> wrote:
> I have managed to get the credit/debit part of my
> sheet working, now i'm just bamboozled by the running
> balance part..as it starts with a minus figure.
> I need to know how to make it so when I have a credit
> the balance goes down and a debit makes the balance
> go up..?
Referring to
http://www.excelbanter.com/attachmen...tachmentid=541,
which you mention in another posting in this thread....
That will be easy. But first, you need to tell us:
1. What are the units of -12.00? Hours? The values in the credit and debit
are Excel times (hh:mm). But -12.00 is a decimal number.
2. Should the -12.00 be on a line by itself before the first line of data.
That is, after line 2, but before line 3? Otherwise, I can we subtract/add
the first credit/debit?
Assuming -12.00 represents hours, it is in J3, and the data starts in row 4,
the formula in J4 might be:
=J3 + IF(H4<>"",H4*24,IF(I4<>"",-I4*24,0))
Some other observations:
3. The formula in G3 is =SUM(F3-D3-E3). There is no point in using the SUM
function there. Simply write =F3-D3-E3.
However, I think it would be prudent to write =--TEXT(F3-D3-E3,"hh:mm"),
since you compare values in column G with "constant" times of the form
TIME(7,24,0).
The double-negative (--) converts text to numeric time. The TEXT function
effectively rounds to the minute. It is necessary to eliminate arithmetic
anomalies that creep into Excel computations. These cause infinitesimal
differences with equivalent constants. So theoretically at least, it is
possible for G3 to display as 7:24, but G3>TIME(7,24,0) or G3<TIME(7,24,0)
might be true.
4. I would write TIME(7,24,0) instead of TIME(7,24,). I know: the two are
equivalent. But IMHO, it is error-prone to omit seconds in that manner. In
fact, it seems to be an accident of implementation that the omission is
interpreted as zero. I do not see that allowed in the TIME help page. I
know it's not your "mistake".