Calculate using IF Statement

christianbiker

Active Member
Joined
Feb 3, 2006
Messages
365
I want to set up a basic spreadsheet in order to track account activity for our club. The columns I have set up to track the actual money are as follows:
Amount Debited
Amount Credited
Balance

I want it to be an ongoing calculation that will automatically add/subtract based on where the amount fall. It it falls into the debited column i want it automatically removed from the balance column, and if it falls into the credited column i want it to autmatically add to the balance column.

I came up with this formula to minus:
=IF(C6>0, C6+E5, "")

but when i add another IF statement like this in order to add i get an error:
=IF(C6>0, C6+E5, ""), IF(D6<0, E5-D6, "")
it gives me #VALUE.

How do i get around this?

Thanks.
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
I think you just missed it by a smidge... Try

=IF(C6>0,C6+E5,IF(D6<0,E5-D6,""))

The way the nested if works is:

If (Condition1, Then Sum, Else If (Condition2, Minus, Else Nothing))

Note that if both conditions are true, only the first one will be evaluated.

Hope this helps,

K
 
Upvote 0
I can't tell what your best options are without seeing your sheet, but try this to combine the two formulas:

=IF(C6>0, C6+E5,IF(D6<0, E5-D6, ""))
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,428
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top