+ Reply to Thread
Results 1 to 2 of 2

Combination of operator OR & AND in Excel formula

  1. #1
    Forum Contributor
    Join Date
    06-18-2012
    Location
    Kuching, SARAWAK
    MS-Off Ver
    Excel 2010
    Posts
    116

    Combination of operator OR & AND in Excel formula

    Dear Excel Experts,

    Please help me to understand. I have the below formula. I coded with understanding that:-

    1. If in E2 meet the first condition, which is the value is "terminated", then automatically return result "Yes".
    2. If E2 value is not "terminated", then moves on to the next part, which is if E2 value is "suspended" and at the same time A2 value matches one of the values in the range, it will still return "Yes", else "".

    Correct me if I am wrong, if above statements are correct, why is my formula below still return error even the E2 value is "terminated"?


    =IF(OR(E3="terminated",AND(E3="suspended",MATCH(A3,$K$2:$K$28,0))),"Yes","")



    Appreciate your help.


    Thank you so much.
    DZ

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

    Re: Combination of operator OR & AND in Excel formula

    Hi -

    It's hard to say for sure without a sample spreadsheet. Perhaps you could upload one with sample data? One problem might be that the MATCH function will return a relative position within the array $K$2:$K$28. So you could get a number like 3 or 8 or something. Making that result part of an AND statement, which is comparing TRUE and FALSE, not 3 or 8, could be part of your problem.
    ____________________________________________
    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.

+ 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. What does ! mean as an operator within a formula
    By Tam in forum Excel General
    Replies: 6
    Last Post: 05-13-2021, 10:18 AM
  2. [SOLVED] Array formula with sum , if and operator AND
    By alcalina in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-12-2015, 04:34 PM
  3. [SOLVED] like operator in excel formula
    By linok in forum Excel General
    Replies: 1
    Last Post: 01-29-2015, 02:28 AM
  4. Replies: 1
    Last Post: 08-23-2013, 05:45 PM
  5. [SOLVED] need formula for comparison operator
    By Mindoz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-05-2012, 04:42 PM
  6. Array Formula with AND operator
    By edwardpestian in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-17-2006, 04:56 AM
  7. Excel: Allow combination of formula answer and text in one cell
    By wood nerd in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-03-2006, 08:15 PM

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