Nested IF

J

Jo

Hi everyone, can someone help me with a nested IF function please?

I have created a worksheet for my finances where I have a column for the
date (column B), a column for transactions (column C), a column for credits
(column D), a column for debits (column E) and then a column for the balance
(column F). What I have been trying to do in the balance column is if say,
D4 (a credit) is blank, then leave it blank, otherwise add the amount to the
previous balance in F3, and if say, E4 (a debit) is blank, then leave it
blank, otherwise deduct the amount from the previous balance in F3. I have
tried the following but it returns a VALUE error.

=IF(ISBLANK(D4),"",(F3+D4),IF(ISBLANK(E4),"",(F3-E4))

Can anyone suggest a correction to this please? Many thanks.
 
P

Peo Sjoblom

=IF(COUNT(D4:E4)=0,"",SUM(F3,D4,-E4))

since you wanted a blank


--


Regards,


Peo Sjoblom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

excel 2003 1
Access Running Balance in Access 1
logical functions 3
The If function 4
Hide blank data 4
if/true/false help 3
should I use IF function? 2
A balance sheet 3

Top