Excel Formula which tests a string

If contents of E3 = "Loss"
  value of G3 = -1 * contents of D3
If contents of E3 = "Win"
  value of G3 = ABS(D3)

I need to create a formula for cell G3 based on contents of E3 and D3 as described above.

Help is needed.
LVL 1
supportorangesAsked:
Who is Participating?
 
Juan OcasioApplication DeveloperCommented:
=IF(E3="LOSS",D3*-1,ABS(D3))

or if you're may have something other than WIN or Loss:

=IF(E3="LOSS",D3*-1,IF(E3="WIN",ABS(D3),""))
0
 
Juan OcasioApplication DeveloperCommented:
Here is another way to make sure that Win, WIN, win, Loss, LOSS, loss get identified:

=IF(UPPER(E3)="LOSS",D3*-1,IF(UPPER(E3)="WIN",ABS(D3),""))
0
 
supportorangesAuthor Commented:
Thank you for this quick answer on the weekend.  It is really appreciated!
0
 
Juan OcasioApplication DeveloperCommented:
No problem!  Just reply to this chain if you need additional help or come across an outlier that isn't addressed here!

jocasio
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.