+ Reply to Thread
Results 1 to 5 of 5

Hi and an IF statement question

  1. #1
    Registered User
    Join Date
    11-11-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    38

    Hi and an IF statement question

    Hi - I have just registered on here, so wandering around a little having a look.

    Anyway, my first question.

    I have this IF statement, which does the job, but I need to add two more brackets. Obviously, I can't due to the '7' limit.

    =IF(Z:Z="K3","YES",IF(Z:Z="K4","YES",IF(Z:Z="K5","YES",IF(Z:Z="K6","YES",IF(Z:Z="K7","YES",IF(Z:Z="K8","YES",IF(Z:Z="K9","YES",IF(Z:Z="KA","YES","NO KR"))))))))

    Any ideas gratefully accepted.

    Cheers,
    John.
    Last edited by Johnmitch93; 11-11-2011 at 05:26 PM.

  2. #2
    Registered User
    Join Date
    11-01-2011
    Location
    Boca Raton, Florida
    MS-Off Ver
    Excel 2003
    Posts
    21

    Re: Hi and an IF statement question

    You should consider creating a two column table with K3 - Yes, K4 - Yes, and so on. Then use VLookup to lookup the appropriate value (Yes, No KR)

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Hi and an IF statement question

    Another solution;

    =IF(OR(Z:Z={"KA","K4","K5","K6","K7","K8","K9","K0"}),"Yes","No")
    Does that work for you?

    Wondering why you're using Z:Z instead of referencing a specific cell?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    11-11-2011
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Hi and an IF statement question

    Sorted job!

    Chemist B - I used your solution and it worked a treat.
    Then I thought, why not reference a specific cell, as in replace Z:Z with Z2 etc.
    That works too!
    As for why I didn't at first - well, it was what I knew and it worked...

    SDBoca - I will have a bash at your solution over the weekend and see what occuurs.

    Cheers all,
    John.

    Now, how to mark the thread "resolved"...

  5. #5
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Hi and an IF statement question

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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