Google Finace change a number to negative if another column is marked sell

134 Views Asked by At

Currently working on making a portfolio tracker.

im looking probably for a if statement that will change my Quantity of shares held to a negative if another column is labeled as 'SELL'. You can see from the image provided, the right column is what im looking for.

enter image description here

1

There are 1 best solutions below

0
player0 On

simple IF switch:

=IF(B2="sell"; GOOGLEFINANCE()*-1; GOOGLEFINANCE())