+ Reply to Thread
Results 1 to 3 of 3

Conditional Expressions Logical Expression in an IF statement?

Hybrid View

Skywize Conditional Expressions... 10-26-2012, 12:31 AM
FDibbins Re: Conditional Expressions... 10-26-2012, 12:39 AM
Skywize Re: Conditional Expressions... 10-26-2012, 11:03 AM
  1. #1
    Registered User
    Join Date
    10-26-2012
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Conditional Expressions Logical Expression in an IF statement?

    Salutation. I've exhausted other forms of help, so I'm taking a shot on this forum.

    I am attempting to use two conditional expressions within a logical expression (IF statement) in MS Excel 2007. Each of the conditional expressions test individually as TRUE, but when separated with an &, they evaluate as false. I tried using AND to separate them, and that expression is deemed #INVALID. I've tried using adjacent cells on the same sheet, but the result is the same even when specifying a cell on an alternate sheet (named Pos2). Here is the logical expression that is evaluating incorrectly:

    =IF(B7=1 & Pos2!N7=1,1,0)

    Again, the individual expressions ( B7=1 as well as Pos2!N7=1 ) evaluate to 1 when by themselves. Together in the above statement they evaluate to 0, when they should evaluate to 1.

    Any help or input on this would be hugely appreciated.

    Regards,
    ~Skywise
    Aka Mark

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,047

    Re: Conditional Expressions Logical Expression in an IF statement?

    not sure if i understand you correctly, but give this a try

    =IF(and(B7=1,Pos2!N7=1),1,0)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    10-26-2012
    Location
    Pennsylvania, USA
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Conditional Expressions Logical Expression in an IF statement?

    Okay, I can see that format's logic, but I was unable to find it anywhere in the help files.

    It does indeed work - thank you very much!

    ~Skywise
    Aka Mark

+ 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