ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   AND and OR in a single formula (https://www.excelbanter.com/excel-worksheet-functions/43397-single-formula.html)

Tom

AND and OR in a single formula
 
Hi

I am trying to create a formula in my spreadsheet that evaluates two fields
and generates a string based on the evaluation.

Each field can contain one of three values - "Complete", "n/a" or "" (blank)

I then want to evaluate two fields that both have this criteria and return
the string "Complete" if both evaluations return true or "Incomplete" if one
or more return false.

I have developed the following formula but it is not working

=IF(AND((OR(A1="Complete","n/a")),(OR(B1="Complete","n/a"))),"Complete","Incomplete")

Is there a way this can be done?

any help much appreciated!

Biff

Hi!

Try this:

=IF(AND(OR(A1={"Complete","N/A"}),OR(B1={"Complete","N/A"})),"Complete","Incomplete")

Biff

"Tom" wrote in message
...
Hi

I am trying to create a formula in my spreadsheet that evaluates two
fields
and generates a string based on the evaluation.

Each field can contain one of three values - "Complete", "n/a" or ""
(blank)

I then want to evaluate two fields that both have this criteria and return
the string "Complete" if both evaluations return true or "Incomplete" if
one
or more return false.

I have developed the following formula but it is not working

=IF(AND((OR(A1="Complete","n/a")),(OR(B1="Complete","n/a"))),"Complete","Incomplete")

Is there a way this can be done?

any help much appreciated!




Rowan

Try

=IF(AND((OR(A1="Complete",A1="n/a")),(OR(B1="Complete",B1="n/a"))),"Complete","Incomplete")

Regards
Rowan

"Tom" wrote:

Hi

I am trying to create a formula in my spreadsheet that evaluates two fields
and generates a string based on the evaluation.

Each field can contain one of three values - "Complete", "n/a" or "" (blank)

I then want to evaluate two fields that both have this criteria and return
the string "Complete" if both evaluations return true or "Incomplete" if one
or more return false.

I have developed the following formula but it is not working

=IF(AND((OR(A1="Complete","n/a")),(OR(B1="Complete","n/a"))),"Complete","Incomplete")

Is there a way this can be done?

any help much appreciated!


Ragdyer

Try this:

=IF(AND(OR(A1={"Complete","n/a"}),OR(B1={"Complete","n/a"})),"Complete","Inc
omplete")

--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"Tom" wrote in message
...
Hi

I am trying to create a formula in my spreadsheet that evaluates two

fields
and generates a string based on the evaluation.

Each field can contain one of three values - "Complete", "n/a" or ""

(blank)

I then want to evaluate two fields that both have this criteria and return
the string "Complete" if both evaluations return true or "Incomplete" if

one
or more return false.

I have developed the following formula but it is not working


=IF(AND((OR(A1="Complete","n/a")),(OR(B1="Complete","n/a"))),"Complete","Inc
omplete")

Is there a way this can be done?

any help much appreciated!




All times are GMT +1. The time now is 04:23 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com