Computing.Net > Forums > Office Software > Excel nesting AND and If formulars

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Excel nesting AND and If formulars

Reply to Message Icon

Name: Bec_Wik
Date: September 19, 2009 at 22:43:57 Pacific
OS: Windows Vista
Product: Microsoft Excel 2007
Subcategory: Microsoft Office
Tags: excel, nesting, IF formula, AND formula.
Comment:

I'm trying (and failing) to nest a complex IF and AND
formula..
Here are the details:

H..................I.................J
Rule #1 .......Rule #2.....Final Decision
TRUE............FALSE
TRUE............TRUE
FALSE...........TRUE
FALSE...........FALSE

The two rules are If and And formulas already, (Rule 1
is =IF($D6<(0.1*$C6), "TRUE", "FALSE") (Rule 2 is
=AND($E6>500000,$F6<=2,$G6=1) and they are
working fine.

But in the Final decision column I need to have:
"Reject" if both rule 1 and 2 are FALSE
"Accept" if both rule 1 and 2 are TRUE
"Recommend for evaluation" if rule 1 is TRUE and rule
2 is FALSE or if rule 1 is FALSE and rule 2 is TRUE.

I've tried a couple of different ways so far, but have
been unsuccessful. This is what I've tried so far:

=IF((AND($H6=TRUE, $I6=TRUE)), "Accept",
IF((AND($H6=TRUE, $I6=FALSE)), "Recommend
further evaluation", IF((AND($H6=FALSE, $I6=TRUE)),
"Recommend further evaluation", "Reject")))

( But every time it comes up with "Reject" even when
it shouldnt)

=IF((AND($H6="True", $I6="True")), "Accept",
IF(AND($H6="False", $I6="False"), "Reject",
"Recommend further evaluation"))

(And everytime this one comes up with "recommend
further evaluation" even when it shouldn't"

I'm thinking I'm going wrong with some brackets
somewhere or if its because the Cells under the Rule
1 and 2 columns already have formulas in them and its
confusing poor excel..

Please Help!!



Sponsored Link
Ads by Google

Response Number 1
Name: Humar
Date: September 20, 2009 at 05:39:28 Pacific
Reply:

Hi,

Try this,

=IF(AND(H1=TRUE,I1=TRUE),"Accept",IF(AND(H1=FALSE,I1=FALSE),"Reject","Recommend"))

The initial true and false results were in columns H and I with this formula in column J

Regards


0

Response Number 2
Name: Bec_Wik
Date: September 20, 2009 at 06:07:16 Pacific
Reply:

Thanks for your reply.
I did try this,
but it is still giving me "recommend" answer for everyone.

I just dont know what im doing wrong haha.


0

Response Number 3
Name: Humar
Date: September 20, 2009 at 06:22:50 Pacific
Reply:

Hi,

Here is what I get with the formula:

  H       I         J
TRUE	FALSE	Recommend
TRUE	TRUE	Accept
FALSE	TRUE	Recommend
FALSE	FALSE	Reject

As this doesn't work for you it suggests that the output of your initial formulas are not evaluating to real true or false conditions.

The formula IF($D6<(0.1*$C6), "TRUE", "FALSE")
should be
IF($D6<(0.1*$C6), TRUE, FALSE)
Note - no double quotes around true and false
and the same for any other formula that you are evaluating to true or false

Regards


0

Response Number 4
Name: DerbyDad03
Date: September 20, 2009 at 06:52:06 Pacific
Reply:

Bec_Wik

The key point of Humar's response is that "TRUE" with the quotes places a text value in the cell while TRUE without the quotes places a logical value in the cell.

This places text value in the cell:

=IF($D6<(0.1*$C6), "TRUE", "FALSE")

This checks for a logical value:

=IF((AND($H6=TRUE, $I6=TRUE))...

A logical TRUE <> a text TRUE, so your IF statements will always evaluate to the value_if_false.


0

Response Number 5
Name: Bec_Wik
Date: September 20, 2009 at 15:41:06 Pacific
Reply:

Thank you so much, it now works!
It was definitely the formula in the H column.
Will know the difference between logical and text values in
future.
Thank you!


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon





Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Excel nesting AND and If formulars

Excel nested IF alternative help www.computing.net/answers/office/excel-nested-if-alternative-help/7828.html

Excel Nested IF/AND www.computing.net/answers/office/excel-nested-ifand/8313.html

Excel VBA and Access communication www.computing.net/answers/office/excel-vba-and-access-communication-/4755.html