Problem with spreadsheet formula

J Andrews 0 Reputation points
2026-07-30T12:56:52.8966667+00:00

I have the following formula which does not do all I want it to: =IF(E6>0,E6-F6+G5,"")

The problem occurs when G5 is empty, the row 7 will not calculate. If I change "" to 0, then a string of zeros are in G as far as the formula is pasted. I wish to be rid of them without needing to pull the formula down every time. How is that accomplished.

In other words, nothing is in F7, so I want G8 to be empty.

I hope this explains everything. I am new to this.

Microsoft 365 and Office | Excel | For home | Windows
0 comments No comments

5 answers

Sort by: Most helpful
  1. J Andrews 0 Reputation points
    2026-07-30T13:47:58.1366667+00:00

    Thanks for your input. I have very little knowledge of spreadsheets.

    My sheet has E column as expenses, F as payments, G as balance.

    The formula I posted works in part, for when G is left blank (no 0), then the next row will not calculate. If I change "" to 0 in the formula, then I end up with zeros in column G. That works, but I don't like seeing them, and i do not wish to hide and unhide everytime i make a calculation.

    Was this answer helpful?

    1 person found this answer helpful.

  2. DaveM121 910.2K Reputation points Independent Advisor
    2026-07-30T13:34:34.4066667+00:00

    Your formula is formatted correctly, there is no problem indicated.

    1

    Select the cells E6, F6 and G5, then right click them and choose Format Cells.

    Ensure the cells are formatted as a number format.

    2

    Also, you mention cells F7 and G8, those cells are not listed in your formula, what cell is that formula entered into.

    Was this answer helpful?

    1 person found this answer helpful.

  3. J Andrews 0 Reputation points
    2026-07-30T13:24:24.68+00:00

    Thank you for you quick reply. Unfortunately, the formula does not calculate column G, which is need to keep a running total.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments

  4. Senthil kumar 1,725 Reputation points
    2026-07-30T13:05:24.9266667+00:00

    Hi @J Andrews

    =IF(E6>0, E6 - F6 + IF(LEN(G5)=0, 0, G5), "")

    Try this above formula. and give your feedback.

    Thanks.

    Was this answer helpful?

    1 person found this answer helpful.

  5. J Andrews 0 Reputation points
    2026-07-30T13:52:38.63+00:00

    Didn't see that you wanted to know where the formula is. It is in column G

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.