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

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

kkknie

Well-known Member
Joined
Apr 29, 2002
Messages
677
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
 

priddyboy

Board Regular
Joined
Feb 10, 2006
Messages
60
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, ""))
 

Forum statistics

Threads
1,171,158
Messages
5,874,103
Members
433,024
Latest member
ostosix

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
Top