Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
John Pinback
 
Posts: n/a
Default 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   Report Post  
Bob Phillips
 
Posts: n/a
Default

Karl,

Got a False somewhere else in Used or Allowed?

--
HTH

Bob Phillips

"John Pinback" 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   Report Post  
John Pinback
 
Posts: n/a
Default

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" wrote in message
...
Karl,

Got a False somewhere else in Used or Allowed?

--
HTH

Bob Phillips

"John Pinback" 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






  #4   Report Post  
bj
 
Posts: n/a
Default

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" wrote in message
...
Karl,

Got a False somewhere else in Used or Allowed?

--
HTH

Bob Phillips

"John Pinback" 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   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

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





  #6   Report Post  
bj
 
Posts: n/a
Default

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create a function to return text if two logical functions are true janeyt Excel Worksheet Functions 2 March 19th 05 08:49 PM
SUMIF function yak10 Excel Worksheet Functions 0 February 12th 05 05:12 PM
Logical Function - Multiple IF statements vnsrod2000 Excel Worksheet Functions 7 February 4th 05 10:42 PM
Logical Function vnsrod2000 Excel Worksheet Functions 2 January 28th 05 04:03 AM
using logical functions as criteria with the SUMIF function pfdubz Excel Worksheet Functions 6 December 1st 04 07:40 PM


All times are GMT +1. The time now is 05:38 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"