+ Reply to Thread
Results 1 to 5 of 5

"IF" "AND" Statement to give 3 different answers

  1. #1
    Registered User
    Join Date
    07-06-2010
    Location
    Beckenham
    MS-Off Ver
    Excel 2007
    Posts
    84

    "IF" "AND" Statement to give 3 different answers

    ok, I have the following formula Which I would like to add a third option, essentially "AR" could also equal "Z" However, If "AR" does equal "Z" then the answer must also be "Z"

    Please Login or Register  to view this content.
    I thought the following would work but it's not quite right

    Please Login or Register  to view this content.
    I have uploaded an example sheet, the above code is located in column "S"

    Any help would be much appreciated
    Attached Files Attached Files
    Last edited by AllenMead; 11-05-2010 at 07:28 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: "IF" "AND" Statement to give 3 different answers

    Try this:

    =IF(BG3="", IF(AR3="Z", "Z", IF(OR(AR3={"Y","A"}),"Y","")), "")
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    07-06-2010
    Location
    Beckenham
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: "IF" "AND" Statement to give 3 different answers

    Thanks JBeaucaire Spot on.

  4. #4
    Valued Forum Contributor squiggler47's Avatar
    Join Date
    02-17-2009
    Location
    Littleborough, UK
    MS-Off Ver
    Excel 3.0 to 2007+2010! (couldnt get 2.1 working)
    Posts
    1,013

    Re: "IF" "AND" Statement to give 3 different answers

    You dont quite make it clear what you want to achieve but IFS isnt a function to start with!

    I assume BG4 has to ="" or cell will contain ""

    then depending on "Y", "A", "Z" you will want to look up another value

    so perhaps

    =IF(BG4="",CHOOSE(1+SUM((AR4={"Y","A","Z"})*{1,2,3}),"","Y","A","Z"),"")
    Regards
    Darren

    Update 12-Nov-2010 Still job hunting!

    If you are happy with the results, please add to our reputation by clicking the blue scales icon in the blue bar of the post.

    Learn something new each day, Embrace change do not fear it, evolve and do not become extinct!


  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: "IF" "AND" Statement to give 3 different answers

    Quote Originally Posted by AllenMead View Post
    Thanks JBeaucaire Spot on.

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

+ 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