close

In EXCEL, I want to change the cell color to reflect the text value. Like if
the cell contains quot;Johnquot;, I want the cell color to be green, if quot;Bobquot;, the
cell color to be Blue, if quot;Frankquot;, purple, if quot;Joequot;, red, etc. I want to be
able to display about 18 different colors. Conditional Formatting has a
limitation of three if conditions. Thanks for your help.



quot;bluejayquot; wrote:

gt; In EXCEL, I want to change the cell color to reflect the text value. Like if
gt; the cell contains quot;Johnquot;, I want the cell color to be green, if quot;Bobquot;, the
gt; cell color to be Blue, if quot;Frankquot;, purple, if quot;Joequot;, red, etc. I want to be
gt; able to display about 18 different colors. Conditional Formatting has a
gt; limitation of three if conditions. Thanks for your help.
gt;
Have you tried quot;ifquot;?

Sub colourme18x()
For Each cell In Range(quot;a1:a555quot;)
If cell.Value = quot;fredquot; Then cell.Interior.ColorIndex = 35
If cell.Value = quot;bobquot; Then cell.Interior.ColorIndex = 37
If cell.Value = quot;frankquot; Then cell.Interior.ColorIndex = 39
Next
End Sub

continue to suit and adjust range where needed, record a macro if you to, to
get colour codes
cheers
Pete

--
(][ THIS EMAIL HAS BEEN SCANNED BY NORTON ANTIVIRUS ][)
quot;bluejayquot; lt;u17219@uwegt; wrote in message news:59c893e469d7a@uwe...
gt; In EXCEL, I want to change the cell color to reflect the text value. Like
gt; if
gt; the cell contains quot;Johnquot;, I want the cell color to be green, if quot;Bobquot;, the
gt; cell color to be Blue, if quot;Frankquot;, purple, if quot;Joequot;, red, etc. I want to
gt; be
gt; able to display about 18 different colors. Conditional Formatting has a
gt; limitation of three if conditions. Thanks for your help.
You can use cell conditional formatting

condition1: Cell Value is Equal To John
then select the Format Color

Add gt;gt; conditions to suit

quot;bluejayquot; wrote:

gt; In EXCEL, I want to change the cell color to reflect the text value. Like if
gt; the cell contains quot;Johnquot;, I want the cell color to be green, if quot;Bobquot;, the
gt; cell color to be Blue, if quot;Frankquot;, purple, if quot;Joequot;, red, etc. I want to be
gt; able to display about 18 different colors. Conditional Formatting has a
gt; limitation of three if conditions. Thanks for your help.
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()