+ Reply to Thread
Results 1 to 3 of 3

If cell contains W, do this, but if contains L, do this

  1. #1
    Registered User
    Join Date
    01-15-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    1

    If cell contains W, do this, but if contains L, do this

    I am trying to write a function, that
    - if (G3 = W, then (H2+F3)
    - if (G3 = L, then (H2-D3)
    - If (G3 = P, then = 0 or do nothing)

    I can get the function to work for just W or just L etc, but not all 3 together.
    Currently I have:
    =IF(ISNUMBER(SEARCH("W",G3)),H2+F3) which works for W and
    =IF(ISNUMBER(SEARCH("L",G3)),H2-D3) which works for L and
    =IF(ISNUMBER(SEARCH("P",G3)),"") which works for P but I was wondering how to put them all into 1 function.

    Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: If cell contains W, do this, but if contains L, do this

    Hi.

    Try this function:

    Please Login or Register  to view this content.
    Click *, if my suggestion helps you. Have a good day!!

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: If cell contains W, do this, but if contains L, do this

    hi alightbreeze, welcome to the forum. try:
    Please Login or Register  to view this content.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    01-15-2013
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: If cell contains W, do this, but if contains L, do this

    Thanks guys,

    jraj, I didn't have any luck with that function but benishiryo, yours worked and solved my issue.

    Thanks again

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1