+ Reply to Thread
Results 1 to 14 of 14

Help With If Statement

  1. #1
    Registered User
    Join Date
    04-08-2016
    Location
    Illinois, US
    MS-Off Ver
    2010
    Posts
    7

    Help With If Statement

    Hello All, I am by no means an expert when it comes to formula's so I need some guidance with this one. What I am trying to accomplish is if I9 result is yes, J9 result is no and K9 result is no, then I want the end result to be either Yes

    What am I doing wrong ?

    =IF(I9=Yes, IF(J9=No,IF(K9=No,"Yes")))

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Help With If Statement

    Your sentence seems to be cut short..
    You were saying
    "then I want the end result to be either Yes" ... Or What ??

    It sounds like you only want YES if I9=Yes and both J9 and K9 = No
    Otherwise, you want No

    Is that about right?

  3. #3
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Help With If Statement

    Hi -

    You need to enclose Yes in quotes in the first term and No in quotes in the second and third term. Should look like this:

    =IF(I9="Yes", IF(J9="No",IF(K9="No","Yes")))
    ____________________________________________
    If this has solved your problem, please edit the thread title to add the word [SOLVED] at the beginning. You can do this by
    -Go to the top of the first post
    -Select Thread Tools
    -Select Mark thread as Solved

    If I have been particularly helpful, please "bump" my reputation by pressing the small star in the lower left corner of my post.

  4. #4
    Registered User
    Join Date
    04-08-2016
    Location
    Illinois, US
    MS-Off Ver
    2010
    Posts
    7

    Re: Help With If Statement

    Jonmo1,

    Yes, you are correct, I want the end result to be Yes, not either

  5. #5
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Help With If Statement

    Try

    =IF(AND(I9="Yes",J9="No",K9="No"),"Yes","No")

  6. #6
    Registered User
    Join Date
    04-08-2016
    Location
    Illinois, US
    MS-Off Ver
    2010
    Posts
    7

    Re: Help With If Statement

    Oh my Gosh, I did not even see that I was missing the " " . Thank you.

    One more thing however. If I want to take this a step further .... If I9 is Yes and if J9 or K9 result is "no", then I want the end result to be NO. How do I formulate that ?

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Help With If Statement

    Before going any further, can you specify all possible scenarios..

    I9=Yes J9=Yes K9=Yes : I want ?
    I9=Yes J9=Yes K9=No : I want ?
    I9=Yes J9=No K9=Yes : I want ?
    I9=Yes J9=No K9=No : I want ?
    I9=No J9=Yes K9=Yes : I want ?
    I9=No J9=Yes K9=No : I want ?
    I9=No J9=No K9=Yes : I want ?
    I9=No J9=No K9=No : I want ?

  8. #8
    Registered User
    Join Date
    04-08-2016
    Location
    Illinois, US
    MS-Off Ver
    2010
    Posts
    7

    Re: Help With If Statement

    Oh My Goodness - How did I not know about this forum sooner. Thank you all!

  9. #9
    Registered User
    Join Date
    04-08-2016
    Location
    Illinois, US
    MS-Off Ver
    2010
    Posts
    7

    Re: Help With If Statement

    Ok, one last scenario . For this formula I have below, if I want to take it a step further. I want this formula to calculate only if cell M9 result is "yes" . Otherwise I want the final result to be $0.00

    =IF(N9>390,"$100.00",IF(N9>260,"$50.00",IF(N9>120,"$25.00",IF(N9<120,"$0.00"))))

  10. #10
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Help With If Statement

    Try:

    =IF(M9="Yes",IF(N9>390,"$100.00",IF(N9>260,"$50.00",IF(N9>120,"$25.00",IF(N9<120,"$0.00")))),"")

  11. #11
    Registered User
    Join Date
    04-08-2016
    Location
    Illinois, US
    MS-Off Ver
    2010
    Posts
    7

    Re: Help With If Statement

    Ok, one last scenario, I promise.... If cells J9 or K9 has results of "no" , then I want the final cell M9 to have a result of $0.00 and not perform the below calculation. The No's takes priority over the below.

    =IF(M9="Yes",IF(N9>390,"$100.00",IF(N9>260,"$50.00",IF(N9>120,"$25.00",IF(N9<120,"$0.00")))),"")

  12. #12
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Help With If Statement

    OK, try this:

    =IF(OR(J9="No",K9="No"),"$0.00",IF(M9="Yes",IF(N9>390,"$100.00",IF(N9>260,"$50.00",IF(N9>120,"$25.00",IF(N9<120,"$0.00")))),""))

  13. #13
    Registered User
    Join Date
    04-08-2016
    Location
    Illinois, US
    MS-Off Ver
    2010
    Posts
    7

    Re: Help With If Statement

    loginjmor

    I miss spoke, correction.....

    If cells J9 or K9 has results of "Yes" , then I want the final cell M9 to have a result of $0.00 and not perform the below calculation. The Yes's takes priority over the below.

    =IF(M9="Yes",IF(N9>390,"$100.00",IF(N9>260,"$50.00",IF(N9>120,"$25.00",IF(N9<120,"$0.00")))),"")

  14. #14
    Valued Forum Contributor loginjmor's Avatar
    Join Date
    01-31-2013
    Location
    Cedar Rapids, Iowa
    MS-Off Ver
    Excel 2013
    Posts
    1,073

    Re: Help With If Statement

    Just change the conditions in the formula to "Yes" as follows:

    =IF(OR(J9="Yes",K9="Yes"),"$0.00",IF(M9="Yes",IF(N9>390,"$100.00",IF(N9>260,"$50.00",IF(N9>120,"$25.00",IF(N9<120,"$0.00")))),""))

    This means both J9 and K9 must be "No" to evaluate M9.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 2
    Last Post: 07-09-2015, 04:25 PM
  2. [SOLVED] If statement to select data - nested statement - assistance
    By petitesouris in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 06-29-2015, 09:55 PM
  3. compile error expected line number statement end statement
    By mattress58 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2014, 10:12 AM
  4. VBA Compile Error : line number or label or statement or end of statement
    By excellearner121 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2013, 06:41 PM
  5. Replies: 4
    Last Post: 06-01-2012, 10:05 AM
  6. Replies: 4
    Last Post: 05-16-2012, 05:33 PM
  7. [SOLVED] Utilize a Select Case Statement in Target Intersect Statement
    By max57 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-29-2009, 08:55 PM

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