+ Reply to Thread
Results 1 to 10 of 10

Excel 2007 : IF and OR

Hybrid View

  1. #1
    Registered User
    Join Date
    05-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    8

    IF and OR

    need to know how to use the functions IF and OR when used together
    I have a survey and that have two possible answers - if a Yes then I want one message, if a No answer than I want a different message.

  2. #2
    Forum Contributor
    Join Date
    02-12-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2007
    Posts
    275

    Re: IF and OR

    A typical formula would be

    =IF(OR(A1=1,B1=1,....),"Message 1","Message 2"
    )

    But to be able to help you we need more information on the cells and values

  3. #3
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: IF and OR

    If you are looking to have 3 options (yes, no and other) then the below formula will work. Replace the Message One and Message Two text with the appropriate message.

    C3=IF(B3="Yes","Message One",IF(B3="No","Message Two",""))
    If you are just doing Yes and No then you could use the shorter formula below with one IF statement

    C3=IF(B3="Yes","Message One","Message Two")
    Let me know if this is what you were looking for!

    Thanks!

  4. #4
    Forum Contributor Russell Dawson's Avatar
    Join Date
    03-01-2012
    Location
    Yorkshire, England
    MS-Off Ver
    2007
    Posts
    608

    Re: IF and OR

    Evertjvr has the correct answer although the last parenthesis has "slipped" slightly. The OP was asking for IF & OR.

    =IF(OR(A1="Yes",A2="Yes"),"Wow","Shame")
    If I helped, please don't forget to add to my reputation. (click on the star below the post)

    If the problem is solved, please: Select Thread Tools (on top of your 1st post) -> Mark this thread as Solved.

    Failure is not falling down but refusing to get up.

  5. #5
    Registered User
    Join Date
    05-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: IF and OR

    A1 will be Yes or No...and I want to get a text mesage from another cell based on the Yes/No response

  6. #6
    Forum Contributor Russell Dawson's Avatar
    Join Date
    03-01-2012
    Location
    Yorkshire, England
    MS-Off Ver
    2007
    Posts
    608

    Re: IF and OR

    Simply substitute the quotes for the cells where the text messages are

    =IF(OR(A1="Yes",A2="Yes"),G1,H1)

    Input the messages in G1 and H1 as required

  7. #7
    Forum Contributor
    Join Date
    02-12-2012
    Location
    South Africa
    MS-Off Ver
    Excel 2007
    Posts
    275

    Re: IF and OR

    If and or will not help you.

    With A1 as the only variable the a double IF will be your answer.

    =IF(A1="YES",B1,IF(A1="NO",C1,"")
    Where B1 and C1 is the cells with message to fetch and that will be displayed in A1

  8. #8
    Registered User
    Join Date
    05-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: IF and OR

    Got it...Thanks

  9. #9
    Forum Contributor Russell Dawson's Avatar
    Join Date
    03-01-2012
    Location
    Yorkshire, England
    MS-Off Ver
    2007
    Posts
    608

    Re: IF and OR

    Burdette - please post your workbook or sample

  10. #10
    Registered User
    Join Date
    05-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: IF and OR

    Have not figured out how to Post in this form.

+ 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