ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Advance if statements? (https://www.excelbanter.com/excel-programming/323920-advance-if-statements.html)

Ralph

Advance if statements?
 
I need to compare a range of values as listed below, as an example:
if(A1="Grade_1",and(B1="Grade_1",and(C1="Grade_1", ...),"OK","Redesign"))).

This is in essence what I want to do but I get a #Value as the return.can
anyone please assist.

Ole P. Erlandsen

Advance if statements?
 
Try this:

=IF(AND(A1="Grade_1",B1="Grade_1",C1="Grade_1"),"O K","Redesign")

--
Ole P.

Ralph wrote:
I need to compare a range of values as listed below, as an example:
if(A1="Grade_1",and(B1="Grade_1",and(C1="Grade_1", ...),"OK","Redesign"))).

This is in essence what I want to do but I get a #Value as the return.can
anyone please assist.


JulieD

Advance if statements?
 
alternatively, but i'm not sure there's any particular benefit to it (maybe
slightly less typing), you could use

=IF(COUNTIF(A1:C1,"Grade_1")=3,"Ok","Redesign")

Cheers
JulieD

"Ole P. Erlandsen" wrote in message
...
Try this:

=IF(AND(A1="Grade_1",B1="Grade_1",C1="Grade_1"),"O K","Redesign")

--
Ole P.

Ralph wrote:
I need to compare a range of values as listed below, as an example:
if(A1="Grade_1",and(B1="Grade_1",and(C1="Grade_1", ...),"OK","Redesign"))).

This is in essence what I want to do but I get a #Value as the return.can
anyone please assist.




Bob Phillips[_6_]

Advance if statements?
 
You already have a response to your previous question. What is wrong with
that one?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ralph" wrote in message
...
I need to compare a range of values as listed below, as an example:
if(A1="Grade_1",and(B1="Grade_1",and(C1="Grade_1", ...),"OK","Redesign"))).

This is in essence what I want to do but I get a #Value as the return.can
anyone please assist.





All times are GMT +1. The time now is 12:55 PM.

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