Formula Question

%3CLINGO-SUB%20id%3D%22lingo-sub-332453%22%20slang%3D%22en-US%22%3EFormula%20Question%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-332453%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20a%20question.%26nbsp%3B%20I%20hope%20you%20can%20help.%26nbsp%3B%20I%20have%20a%20file%20that%20has%20a%20value%20in%20column%20A.%26nbsp%3B%20In%20the%20Result%20column%2C%20I%E2%80%99d%20like%20to%20put%20GREEN%20if%20any%20one%20of%20these%20values%20is%20in%20Column%20A.%3C%2FP%3E%3CP%3EM1C%2CM1R%2CM9V%2CM9W%2CM9L%2CM9M%2CM3N%2CM3L%2CM3M%2CM3J%2CM3K%2CM3H%2CM2R%2CM2M%2CM2N%2CM2M.M2K%2CM2H%2CM2J%2CM1W%2CM1V%2CM1T%2CM1S%2CM1X%2CM1B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20can%20do%20it%20if%20it%20is%20one%20value%20(M1C)%2C%20but%20not%20a%20whole%20bunch%20of%20values%20at%20once.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20you%20know%20if%20the%20formula%20can%20accommodate%20multiple%20values%20to%20check%20for%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-332453%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-332553%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20Question%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-332553%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20may%20put%20all%20your%20codes%20in%20some%20column%2C%20let%20say%20to%20Z1%3AZ17%20or%20so%2C%20and%20when%3C%2FP%3E%0A%3CPRE%3E%3DIF(COUNTIF(%24Z%241%3A%24Z%2417%2CA1)%2C%22GREEN%22%2C%20%22RED%22)%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

I have a question.  I hope you can help.  I have a file that has a value in column A.  In the Result column, I’d like to put GREEN if any one of these values is in Column A.

M1C,M1R,M9V,M9W,M9L,M9M,M3N,M3L,M3M,M3J,M3K,M3H,M2R,M2M,M2N,M2M.M2K,M2H,M2J,M1W,M1V,M1T,M1S,M1X,M1B

 

I can do it if it is one value (M1C), but not a whole bunch of values at once.

 

Do you know if the formula can accommodate multiple values to check for?

1 Reply
Highlighted

Hi,

 

You may put all your codes in some column, let say to Z1:Z17 or so, and when

=IF(COUNTIF($Z$1:$Z$17,A1),"GREEN", "RED")