Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Excel Formula which tests a string

Posted on 2013-05-19
4
Medium Priority
?
287 Views
Last Modified: 2013-05-19
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.
0
Comment
Question by:supportoranges
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 15

Accepted Solution

by:
Juan Ocasio earned 2000 total points
ID: 39178528
=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
 
LVL 15

Expert Comment

by:Juan Ocasio
ID: 39178532
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
 
LVL 1

Author Closing Comment

by:supportoranges
ID: 39178544
Thank you for this quick answer on the weekend.  It is really appreciated!
0
 
LVL 15

Expert Comment

by:Juan Ocasio
ID: 39178550
No problem!  Just reply to this chain if you need additional help or come across an outlier that isn't addressed here!

jocasio
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question