+ Reply to Thread
Results 1 to 9 of 9

Setting a 3rd BOOLEAN statement, based on two others...

  1. #1
    Registered User
    Join Date
    02-05-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    365
    Posts
    87

    Setting a 3rd BOOLEAN statement, based on two others...

    Hi folks,

    I've two Boolean variables.

    I need an if statement (or something else if there's something better) that checks the two and sets a third to TRUE only if the first two are the same, TRUE or FALSE, doesn't matter.

    Any ideas?

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Setting a 3rd BOOLEAN statement, based on two others...

    isn't that just AND =and(a1="x",b1="X") OR JUST =A1=B1
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Setting a 3rd BOOLEAN statement, based on two others...

    Or maybe ...
    =(B2=C2)=(D2=E2)
    Attached Files Attached Files
    Last edited by Marcol; 11-25-2012 at 09:25 AM.
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Registered User
    Join Date
    02-05-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    365
    Posts
    87

    Re: Setting a 3rd BOOLEAN statement, based on two others...

    The sheet works, but I'm running a large(ish) vba script and it's this (nothing on the worksheet itself) that I need to set the variables on.

    VARIABLE_1
    VARIABLE_2
    VARIABLE_3

    Number 3 is true if 1 & 2 are the same, regardless of their state.

    Sorry if what you've sent IS applicable, and I just don't get it...

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Setting a 3rd BOOLEAN statement, based on two others...

    something like
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    02-05-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    365
    Posts
    87

    Re: Setting a 3rd BOOLEAN statement, based on two others...

    So in other words I need to represent this on the sheet somewhere? It can't be handled in the script alone?

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    What are VARIABLE_1,2 and 3 exactly?

    How are VARIABLE_1 and 2 getting their values?
    If posting code please use code tags, see here.

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Setting a 3rd BOOLEAN statement, based on two others...

    that was just a sample you can set the value of j and k from anywhere i just put it like that so i could see it working

  9. #9
    Registered User
    Join Date
    02-05-2012
    Location
    Milton Keynes, England
    MS-Off Ver
    365
    Posts
    87

    Re: Setting a 3rd BOOLEAN statement, based on two others...

    They are true/false conditions that get used in the script and for output, but until the end of the script there's nothing on the sheet to represent this. I believe I've managed to resolve this with the following...


    Please Login or Register  to view this content.

+ 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