Return a value based upon a cell colour

New Contributor

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

6 Replies


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

They have been applied directly


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)


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!