Dear Kaisreddy, Please try this.. and see attached sheet.
Function Color_text(rng As Range) If rng.Interior.ColorIndex = 14 Then Color_text = "Green Color" ElseIf rng.Interior.ColorIndex = 6 Then Color_text = "Yellow Color" ElseIf rng.Interior.ColorIndex = 3 Then Color_text = "Red Color" End If End Function -- Thanks & regards, Noorain Ansari *http://excelmacroworld.blogspot.com/*<http://excelmacroworld.blogspot.com/> *http://noorain-ansari.blogspot.com/* <http://noorain-ansari.blogspot.com/> On Thu, Dec 29, 2011 at 11:28 AM, Kasireddy Amarender <kassi.re...@gmail.com > wrote: > Hi Team, > > I would like to know the options/code for performing some actions > based on the cell interior color. > > for example > > if cell A1 is of Green color I would like to print "Green Color" text in > B1 > if cell A1 is of Red color I would like to print "Red Color" text in B1 > if cell A1 is of Yellow color I would like to print "Yellow Color" text > in B1 > > Thank you in advance for the help. > > Thanks, > Amar > > -- > FORUM RULES (934+ members already BANNED for violation) > > 1) Use concise, accurate thread titles. Poor thread titles, like Please > Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice > will not get quick attention or may not be answered. > > 2) Don't post a question in the thread of another member. > > 3) Don't post questions regarding breaking or bypassing any security > measure. > > 4) Acknowledge the responses you receive, good or bad. > > 5) Cross-promotion of, or links to, forums competitive to this forum in > signatures are prohibited. > > NOTE : Don't ever post personal or confidential data in a workbook. Forum > owners and members are not responsible for any loss. > > > ------------------------------------------------------------------------------------------------------ > To post to this group, send email to excel-macros@googlegroups.com > -- FORUM RULES (934+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com
Color_text.xlsm
Description: Binary data