buy & sales data

maeleoin

New Member
Joined
Dec 3, 2016
Messages
1
Have a list or trades, buy and sell data. Want to subtract purchase amount from sales amount.
How can I change purchase to negative so that I can use subtotal to sort transactions for different products?

Sample

product Amount Gain/loss (Other fields like date and quantity not to be subtotaled)
buy abc $5
sell abc $6
sell ayz $3
buy ayz $1
buy ayz $ 2.5

I am a novice at Excel and realize this problem should have been solved many times in the past.
 

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

baitmaster

Well-known Member
Joined
Mar 12, 2009
Messages
2,039
welcome to the board

use =SUM(amount range) to add up all the values in a range of values. Use =SUMIF(amount range,">0",amount range) to add only those values that are positive. Use =SUMIFS(amount range, amount range,">0",product range,"abc") to add up only those values that are positive and relate to abc
 

Watch MrExcel Video

Forum statistics

Threads
1,129,553
Messages
5,636,989
Members
416,953
Latest member
broexc

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