Thread: Nested IF
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom Peo Sjoblom is offline
external usenet poster
 
Posts: 3,268
Default Nested IF

Try

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




--


Regards,


Peo Sjoblom



"Jo" wrote in message
...
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.
--
Jo