Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mac_architect

macrumors newbie
Original poster
Dec 8, 2017
1
0
Need help with formula in numbers.

BRIEF INTRO.
I have a log of assets that I trade on an exchange. I fill the log every time I buy/sell.

My table (see the picture attached) consists of:
Column A = DATE. (a particular point or period of time by the Gregorian calendar)
Column B = type of transaction. (whether the transaction i make is buy or sell) (!)
Column C = trading pair. (the pair that the assets is traded with e.x. USD or BTC or ETH)
Column D = amount of an asset that I bought. (duh..)(!)
Column bla bla bla... not relevant in this case.

P.S. Column with (!) are the ones that are relevant to the problem.

WHAT I NEED.
I want to use a formula that will calculate my total holdings of a particular asset (in this case cryptocurrency "NEO"). It should determine whether am I buying (therefore it should add the amount of "new" asset I bought) or selling (therefore it should subtract the amount of asset I sold).

I have tried to use IF function, did not work.

Any ideas on which function to use and how to make it work???

See the picture attached for further explanation. If not clear ask.


Screen Shot 2017-12-08 at 21.12.39.png
 
Last edited:

Jjayf

macrumors 6502
May 31, 2015
334
392
To do this easily the entries you make will be either positive for Buy or negative for Sell. So the cell formula with total assets would be SUM (cells in amount column) written xX:xX

Going forward you make the entries like 3 or -3 etc.
 

Bart Kela

Suspended
Oct 12, 2016
865
593
Searching...
The easiest way to handle this would be to get rid of the Type of Transaction column and simply record the Amount as positive (Buy) or negative (Sell) numbers.

5 x 10 = 50
-3 x 15 = -45
10 x 10 = 100

The Total Holdings would be the SUM of the cells above it, the Total Value would be the SUM of the cells above it.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.