If “0” then leave the cell blank

前端 未结 7 1013
庸人自扰
庸人自扰 2020-12-10 01:37

I am trying to create a simple ledger and on the far right of the \"Book\" it totals any debit/credit that I input. But instead of leaving the unused rows blank, it keeps re

7条回答
  •  再見小時候
    2020-12-10 02:21

    An accrual ledger should note zeroes, even if that is the hyphen displayed with an Accounting style number format. However, if you want to leave the line blank when there are no values to calculate use a formula like the following,

     =IF(COUNT(F16:G16), SUM(G16, INDEX(H$1:H15, MATCH(1e99, H$1:H15)), -F16), "")
    

    That formula is a little tricky because you seem to have provided your sample formula from somewhere down into the entries of the ledger's item rows without showing any layout or sample data. The formula I provided should be able to be put into H16 and then copied or filled to other locations in column H but I offer no guarantees without seeing the layout.

    If you post some sample data or a publicly available link to a screenshot showing your data layout more specific assistance could be offered. http://imgur.com/ is a good place to host a screenshot and it is likely that someone with more reputation will insert the image into your question for you.

提交回复
热议问题