+ Reply to Thread
Results 1 to 6 of 6

Logical AND function

  1. #1
    John Pinback
    Guest

    Logical AND function

    If I name an array G2:G90 Used and a second array H2:H90 Allowed and put
    logical values in these columns then I should be able to use the AND
    function but it gives me the wrong answer.

    For example, say G3 = TRUE and H3 = TRUE and I put the following formula in
    I3:

    = AND(Used, Allowed)

    I expect to see TRUE in I3 but I get FALSE.

    Thanks,
    Karl
    kwb AT dcm-va.com



  2. #2
    Bob Phillips
    Guest

    Re: Logical AND function

    Karl,

    Got a False somewhere else in Used or Allowed?

    --
    HTH

    Bob Phillips

    "John Pinback" <[email protected]> wrote in message
    news:GZPde.2321$cf5.869@lakeread07...
    > If I name an array G2:G90 Used and a second array H2:H90 Allowed and put
    > logical values in these columns then I should be able to use the AND
    > function but it gives me the wrong answer.
    >
    > For example, say G3 = TRUE and H3 = TRUE and I put the following formula

    in
    > I3:
    >
    > = AND(Used, Allowed)
    >
    > I expect to see TRUE in I3 but I get FALSE.
    >
    > Thanks,
    > Karl
    > kwb AT dcm-va.com
    >
    >




  3. #3
    Peo Sjoblom
    Guest

    RE: Logical AND function

    So you want to return TRUE if adjacent cells are TRUE regardless of how many?

    =SUMPRODUCT(--(Used=TRUE),--(Allowed=TRUE))>0

    will do it

    Otherwise if you are copying down in I checking each row and don't want to use
    the cell references

    =IF(ISERR(AND(INDEX(Used,ROW()),INDEX(Allowed,ROW()))),"",AND(INDEX(Used,ROW()),INDEX(Allowed,ROW())))

    will retrun TRUE for 2 adjacent cells holding TRUE

    Regards,

    Peo Sjoblom

    "John Pinback" wrote:

    > If I name an array G2:G90 Used and a second array H2:H90 Allowed and put
    > logical values in these columns then I should be able to use the AND
    > function but it gives me the wrong answer.
    >
    > For example, say G3 = TRUE and H3 = TRUE and I put the following formula in
    > I3:
    >
    > = AND(Used, Allowed)
    >
    > I expect to see TRUE in I3 but I get FALSE.
    >
    > Thanks,
    > Karl
    > kwb AT dcm-va.com
    >
    >
    >


  4. #4
    John Pinback
    Guest

    Re: Logical AND function

    Bob,

    I was able to get it to work by doing this:

    AND(Used=TRUE, Allowed=TRUE)

    Looks ugly but it works.

    Thanks,
    Karl
    "Bob Phillips" <[email protected]> wrote in message
    news:[email protected]...
    > Karl,
    >
    > Got a False somewhere else in Used or Allowed?
    >
    > --
    > HTH
    >
    > Bob Phillips
    >
    > "John Pinback" <[email protected]> wrote in message
    > news:GZPde.2321$cf5.869@lakeread07...
    > > If I name an array G2:G90 Used and a second array H2:H90 Allowed and put
    > > logical values in these columns then I should be able to use the AND
    > > function but it gives me the wrong answer.
    > >
    > > For example, say G3 = TRUE and H3 = TRUE and I put the following formula

    > in
    > > I3:
    > >
    > > = AND(Used, Allowed)
    > >
    > > I expect to see TRUE in I3 but I get FALSE.
    > >
    > > Thanks,
    > > Karl
    > > kwb AT dcm-va.com
    > >
    > >

    >
    >




  5. #5
    bj
    Guest

    RE: Logical AND function

    I am not sure what you are trying to do. If you are trying to just check if
    G3 and H3 are true I would try
    =and(G3,H3)

    = AND(Used, Allowed)
    will only give true if every cell in Used and Allowed has a true or is blank

    "John Pinback" wrote:

    > If I name an array G2:G90 Used and a second array H2:H90 Allowed and put
    > logical values in these columns then I should be able to use the AND
    > function but it gives me the wrong answer.
    >
    > For example, say G3 = TRUE and H3 = TRUE and I put the following formula in
    > I3:
    >
    > = AND(Used, Allowed)
    >
    > I expect to see TRUE in I3 but I get FALSE.
    >
    > Thanks,
    > Karl
    > kwb AT dcm-va.com
    >
    >
    >


  6. #6
    bj
    Guest

    Re: Logical AND function

    this will only work for the first cell in each ranges. this is the same as
    And(G2,H2)

    "John Pinback" wrote:

    > Bob,
    >
    > I was able to get it to work by doing this:
    >
    > AND(Used=TRUE, Allowed=TRUE)
    >
    > Looks ugly but it works.
    >
    > Thanks,
    > Karl
    > "Bob Phillips" <[email protected]> wrote in message
    > news:[email protected]...
    > > Karl,
    > >
    > > Got a False somewhere else in Used or Allowed?
    > >
    > > --
    > > HTH
    > >
    > > Bob Phillips
    > >
    > > "John Pinback" <[email protected]> wrote in message
    > > news:GZPde.2321$cf5.869@lakeread07...
    > > > If I name an array G2:G90 Used and a second array H2:H90 Allowed and put
    > > > logical values in these columns then I should be able to use the AND
    > > > function but it gives me the wrong answer.
    > > >
    > > > For example, say G3 = TRUE and H3 = TRUE and I put the following formula

    > > in
    > > > I3:
    > > >
    > > > = AND(Used, Allowed)
    > > >
    > > > I expect to see TRUE in I3 but I get FALSE.
    > > >
    > > > Thanks,
    > > > Karl
    > > > kwb AT dcm-va.com
    > > >
    > > >

    > >
    > >

    >
    >
    >


+ 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