# Probably a simple summation problem

#### majon96

##### Board Regular
I have one column that can assume one of two preset values (incoming/outgoing). There's also a column to specify the exact amount of kilos that is incoming/outgoing.

What I want to do is to have one cell containing a formula that makes a summation of (all incoming - all outgoing). How should this formula look, there's about ten rows of information.

/Magnus

### Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.

#### DonkeyOte

##### MrExcel MVP
say A1:A10 = "Incoming" or "Outgoing" and B1:B10 = # of kilos

In C1 enter Incoming and C2 enter Outgoing (this is not required for the calculation - but for presentation)

In D1 enter = SUMIF(\$A\$1:\$A\$10,\$C1,\$b\$1:\$b\$10)

Copy this formula to D2.

#### majon96

##### Board Regular
Maybe I wasn't clear enough what I wanted, sorry.

What I want is a summation that calculates all incoming minus all outgoing.

Thanks
/Magnus

#### DonkeyOte

##### MrExcel MVP
=sumif(a1:A10,"Incoming",B1:b10)-sumif(A1:A10,"outgoing",B1:B10)

Thank you!!

Thank you!!

Replies
2
Views
375
Replies
4
Views
201
Replies
3
Views
207
Replies
0
Views
268
Replies
0
Views
192

1,190,616
Messages
5,981,956
Members
439,745
Latest member
VBANewbieJohn

### 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.

### Which adblocker are you using?

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

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