SOLVED

Return a value based upon a cell colour

%3CLINGO-SUB%20id%3D%22lingo-sub-2683821%22%20slang%3D%22en-US%22%3EReturn%20a%20value%20based%20upon%20a%20cell%20colour%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2683821%22%20slang%3D%22en-US%22%3E%3CP%3EI%20need%20to%20assign%20three%20different%20values%20based%20upon%20three%20different%20cell%20colours%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2683821%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2684063%22%20slang%3D%22en-US%22%3ERe%3A%20Return%20a%20value%20based%20upon%20a%20cell%20colour%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2684063%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1137348%22%20target%3D%22_blank%22%3E%40paul-cas1962%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHave%20the%20cell%20colours%20been%20applied%20directly%2C%20or%20are%20they%20the%20result%20of%20conditional%20formatting%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2684071%22%20slang%3D%22en-US%22%3ERe%3A%20Return%20a%20value%20based%20upon%20a%20cell%20colour%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2684071%22%20slang%3D%22en-US%22%3EThey%20have%20been%20applied%20directly%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2684220%22%20slang%3D%22en-US%22%3ERe%3A%20Return%20a%20value%20based%20upon%20a%20cell%20colour%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2684220%22%20slang%3D%22en-US%22%3E%3CP%3EIs%20there%20a%20function%20in%20ASAP%20Utilities%20that%20will%20enable%20me%20to%20return%20a%20value%20based%20upon%20the%20colour%20of%20another%20cell%3F%26nbsp%3B%20I%20can't%20find%20such%26nbsp%3B%20function.%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I need to assign three different values based upon three different cell colours

6 Replies

@paul-cas1962 

Have the cell colours been applied directly, or are they the result of conditional formatting?

They have been applied directly

@paul-cas1962 

You need custom functions for that.

You can either copy them from Color Functions In Excel or use ASAP Utillities (free for personal use)

Is there a function in ASAP Utilities that will enable me to return a value based upon the colour of another cell?  I can't find such  function.

best response confirmed by paul-cas1962 (New Contributor)
Solution

@paul-cas1962 

The ASAPCELLCOLORINDEX function returns the fill color index of a cell. You can use this in an IFS or SWITCH formula.

@Hans Vogelaar  That's perfect and does exactly what I needed.  Thank you so much!