#### Iconoclast1978

##### Member
Hi,

Really basic really. I am using google sheets to log my progress and chart analysis etc.

I am struggling to figure out how to make a formula that behaves a certain way if either "LONG" or "SHORT" is typed into any cells within another column.

For example;

30.25 shares bought at 90.48 then sold at 89.37 =32.75 disparity which is you're long is a loss but if you're short is a profit.

I have tried SUMIF and various other combinations for hours but it's not having it. Anyone with this knowledge I'd be super appreciative if they could give me an example so I can back engineer it.

Ta

#### 1nvest

##### Well-known member
Can you not just write an if formula
If(a="short",b-c,b+c)

#### Iconoclast1978

##### Member
Can you not just write an if formula
If(a="short",b-c,b+c)
Can you not just write an if formula
If(a="short",b-c,b+c)
Think I've tried but will try again now.

#### lucreceross

##### Junior member
If you are not able to apply a formula, then check out youtube you will find plenty of short videos there.

Replies
1
Views
1K
Replies
0
Views
273
Replies
0
Views
14K
Replies
35
Views
4K
Replies
14
Views
3K