IF Fill Color = Green, then "G"

  • Thread starter Thread starter ivera
  • Start date Start date
I

ivera

Hi,

Is this possible? I would like to create a statement saying...if the FILL
COLOR of cell D1234 = Green, then type "G".

Can this be done (with or without VBA)...and well, how if possible.

Thanks.
 
Add a UDF

Function IsColour(rng As Range, ci As Long)
iscolour = rng.Interior.ColorIndex=ci
End Function

and use like so

=IF(IsColour(E3,10),"G","")


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
If the fill color is green due to manual operation then you can use the
CellColorIndex UDF from Chip Pearson.

http://www.cpearson.com/excel/colors.htm

If colored green due to Conditional Formatting click the link to CF near top of
the page.


Gord Dibben MS Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top