AgTalk Home
AgTalk Home
Search Forums | Classifieds (44) | Skins | Language
You are logged in as a guest. ( logon | register )

Excel spreadsheet
View previous thread :: View next thread
   Forums List -> Computer TalkMessage format
 
aNullValue
Posted 11/8/2025 11:01 (#11427669 - in reply to #11426197)
Subject: RE: Excel spreadsheet


Fairfield County, Ohio, USA
franko - 11/6/2025 23:06

I have spreadsheet with a "total" column containing the formulas " previous total - debit + credit"
Can someone tell me how to stop the whole column being filled with the last total entry, when there no entries in the other "debit" or "credit" cells, please.


I assume you are trying to make it so that the total column simply doesn't extend forever, since the rows of useful data do not.

Here's an example formula:

=IF(OR(LEN(B5)>0,LEN(C5)>0),D4+C5-B5,"")

In this example, D4 is the previous total, B5 is the current row debit and C5 is the current row credit.

Function LEN(B5) determines the length of the value in cell B5. If there is any value in that cell, it will return true.

Function OR() causes IF to return true if any of the values (the two length checks) return true.

If IF() returns true, it displays the value of D4+C5-B5 (previous total + credit - debit). If IF() returns false, it displays "" (two quotation marks with nothing between them) which means display nothing (actually a text value with no characters, but that's more or less a distinction without a difference, here).


Edited by aNullValue 11/8/2025 11:01
Top of the page Bottom of the page


Jump to forum :
Search this forum
Printer friendly version
E-mail a link to this thread

(Delete cookies)