+ Reply to Thread
Results 1 to 6 of 6

Basic IF function help needed

  1. #1
    Registered User
    Join Date
    07-21-2009
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2002
    Posts
    19

    Basic IF function help needed

    This should be a pretty easy fix for most of you but I guess I'm just missing something.

    I'm comparing data from two columns like this:

    FALSE
    FALSE
    FALSE TRUE
    FALSE FALSE
    FALSE
    FALSE

    and my goal is to have a TRUE or FALSE in the third column for the following criteria:

    TRUE if left column equals TRUE or if left column equals FALSE and right column equals TRUE

    False if else

    My function: =IF(OR(L3=TRUE,AND(L3=FALSE, M3=TRUE)),TRUE,FALSE)
    where L is the left column and M is the right column.

    Here is the data set with the expected results:

    FALSE FALSE
    FALSE FALSE
    FALSE TRUE TRUE
    FALSE FALSE FALSE
    FALSE FALSE
    FALSE

    Thanks.
    Last edited by EME; 07-27-2009 at 12:44 PM.

  2. #2
    Forum Contributor
    Join Date
    02-23-2006
    Location
    Near London, England
    MS-Off Ver
    Office 2003
    Posts
    770

    Re: Basic IF function help needed

    You function "does what it says on the tin", (ie. it behaves as expected).
    Where is your input data coming from? It is possible that the cell actually contains the TEXT, "TRUE", or "FALSE" rather than the value TRUE, or FALSE.

    What do you get if you change your function as per below:
    Please Login or Register  to view this content.
    Last edited by Phil_V; 07-27-2009 at 11:25 AM.
    If you find the response helpful please click the scales in the blue bar above and rate it
    If you don't like the response, don't bother with the scales, they are not for you

  3. #3
    Registered User
    Join Date
    07-21-2009
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2002
    Posts
    19

    Re: Basic IF function help needed

    Quote Originally Posted by Phil_V View Post
    You function "does what it says on the tin", (ie. it behaves as expected).
    Where is your input data coming from? It is possible that the cell actually contains the TEXT, "TRUE", or "FALSE" rather than the value TRUE, or FALSE.

    What do you get if you change your function as per below:
    [code]=IF(OR(L3="TRUE",AND(L3="FALSE", M3="TRUE")),TRUE,FALSE)[code]
    Well my input data is from the two columns in the first part of my original post and the cells are the boolean TRUE and FALSE not the text. But I forgot to mention the error outright. The problem is that the function misrecognizes the AND parameter; if L3 is FALSE and M3 is TRUE the function still returns FALSE.

  4. #4
    Forum Contributor
    Join Date
    02-23-2006
    Location
    Near London, England
    MS-Off Ver
    Office 2003
    Posts
    770

    Question Re: Basic IF function help needed

    I'm using Excel 2003, in case that makes a difference, but it works fine here:

    Please Login or Register  to view this content.
    Try the attached workbook and see what you get?
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-21-2009
    Location
    Houston, Texas
    MS-Off Ver
    Excel 2002
    Posts
    19

    Re: Basic IF function help needed

    Thanks, I just got it.

  6. #6
    Forum Contributor
    Join Date
    02-23-2006
    Location
    Near London, England
    MS-Off Ver
    Office 2003
    Posts
    770

    Re: Basic IF function help needed

    Can you elaborate on what the problem / solution was in the end?

+ 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