ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   formula for blank cell (https://www.excelbanter.com/excel-worksheet-functions/48128-formula-blank-cell.html)

deane1935

formula for blank cell
 

I have a spreadsheet to keep a running balance. I have a formula
=sum(c2,-a3,+b3). It is copied thru the speadsheet. It works fine
except the last balance is propagated to the end of the sheet. I would
like to be able to check col a and col b and if they are blank, make
col c blank. How can I do this and still keep my running balance when I
enter a debit in col a or a credit in col b? Thanks for any help. Deane


--
deane1935
------------------------------------------------------------------------
deane1935's Profile: http://www.excelforum.com/member.php...o&userid=27719
View this thread: http://www.excelforum.com/showthread...hreadid=472349


bill k


IF(AND(A3="",B3=""),"",C2-A3+B3)

should do the trick


--
bill k


------------------------------------------------------------------------
bill k's Profile: http://www.excelforum.com/member.php...nfo&userid=821
View this thread: http://www.excelforum.com/showthread...hreadid=472349


deane1935


Thanks Bill, but unless I am doing something wrong, it doesn't work.


--
deane1935
------------------------------------------------------------------------
deane1935's Profile: http://www.excelforum.com/member.php...o&userid=27719
View this thread: http://www.excelforum.com/showthread...hreadid=472349


Cutter


For a running balance in Column C do this

Assume you are putting your first formula in C4 and your carry-over or
starting balance is in C3

=IF(AND(A4="",B4=""),"",C3-A4+B4)

NOTE that you do not put negative numbers in your debit column (A),
otherwise you'll be adding the debits instead of subtracting them.


--
Cutter
------------------------------------------------------------------------
Cutter's Profile: http://www.excelforum.com/member.php...fo&userid=9848
View this thread: http://www.excelforum.com/showthread...hreadid=472349


deane1935


Thanks Cutter, the = in front of IF made it work.


--
deane1935
------------------------------------------------------------------------
deane1935's Profile: http://www.excelforum.com/member.php...o&userid=27719
View this thread: http://www.excelforum.com/showthread...hreadid=472349


Cutter


You're welcome. And yes, the = is very important. It's what makes it a
formula. Otherwise it's just a text string.


--
Cutter
------------------------------------------------------------------------
Cutter's Profile: http://www.excelforum.com/member.php...fo&userid=9848
View this thread: http://www.excelforum.com/showthread...hreadid=472349



All times are GMT +1. The time now is 02:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com