Danish Xavier
Danish Xavier

Reputation: 1217

How to get negative values after conditional calculation in google sheets?

Hi I have following table created for my trading journal.

enter image description here

As you can see from the formula,

I am matching a string Long or Short based on that I am calculating the values whether I made profit or loss.

Interestingly, in short position, The value should be -4.88 i,e (204.9*48.7804878 - 205*48.7804878). But somehow I am not getting the negative symbol out. How to rectify this?

Upvotes: 2

Views: 91

Answers (1)

Mike Steelson
Mike Steelson

Reputation: 15318

Simply use

=ifs(F3="Short",________,F3="Long",_________)

or

=ifs(REGEXMATCH(F3,"Short"),______,REGEXMATCH(F3,"Long"),________)

Upvotes: 1

Related Questions