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

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

baitmaster

Well-known Member
Joined
Mar 12, 2009
Messages
2,042
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
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,637
Messages
5,838,497
Members
430,551
Latest member
digitalbrolly

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