Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I get drop down menu's to show different background colour
I am trying to create a drop down list of options using data Validation in
Excel 2003. I have set it up fine, but want the results to show the background colour that I have selected for them. For example, if option 1 is selected, the cell would turn green, option 2, blue, etc. Is this possible, and if so, how, as my list will currently only display the text, and no colour? Kind regards |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I get drop down menu's to show different background colour
from the menu bar, pick Format / Conditional Formatting...
"Ayd" wrote: I am trying to create a drop down list of options using data Validation in Excel 2003. I have set it up fine, but want the results to show the background colour that I have selected for them. For example, if option 1 is selected, the cell would turn green, option 2, blue, etc. Is this possible, and if so, how, as my list will currently only display the text, and no colour? Kind regards |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I get drop down menu's to show different background colour
Only the value will come through from the validation list and not the colour.
To make the colour change will require conditional formatting. -- HTH... Jim Thomlinson "Ayd" wrote: I am trying to create a drop down list of options using data Validation in Excel 2003. I have set it up fine, but want the results to show the background colour that I have selected for them. For example, if option 1 is selected, the cell would turn green, option 2, blue, etc. Is this possible, and if so, how, as my list will currently only display the text, and no colour? Kind regards |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I get drop down menu's to show different background colour
You can use VB code to do that. Try this sample, if you wish, and adjust to
suit your needs. Copy and paste into the worksheet VB editor. Where the dropdown cell is in F1 and is a list of 1 to 6 options. If you WANT to see the number selected from the dropdown, change the code lines that look like this (Target.Font.ColorIndex = 3) to a different ColorIndex number that will contrast with the Interior ColorIndex Post back if you need help getting it set up. (By the way, the MVP's can most likely whittle this solution down to a scant few lines of code using Select Case or other magic only they know.) <G Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column < 6 Then Exit Sub If Target.Row < 1 Then Exit Sub Target.Interior.ColorIndex = xlNone If Range("F1").Value = 1 Then With Target.Interior .ColorIndex = 3 .Pattern = xlSolid End With Target.Font.ColorIndex = 3 ElseIf Range("F1").Value = 2 Then With Target.Interior .ColorIndex = 41 .Pattern = xlSolid End With Target.Font.ColorIndex = 41 ElseIf Range("F1").Value = 3 Then With Target.Interior .ColorIndex = 4 .Pattern = xlSolid End With Target.Font.ColorIndex = 4 ElseIf Range("F1").Value = 4 Then With Target.Interior .ColorIndex = 46 .Pattern = xlSolid End With Target.Font.ColorIndex = 46 ElseIf Range("F1").Value = 5 Then With Target.Interior .ColorIndex = 6 .Pattern = xlSolid End With Target.Font.ColorIndex = 6 ElseIf Range("F1").Value = 6 Then With Target.Interior .ColorIndex = 38 .Pattern = xlSolid End With Target.Font.ColorIndex = 38 End If End Sub HTH Regards, Howard "Ayd" wrote in message ... I am trying to create a drop down list of options using data Validation in Excel 2003. I have set it up fine, but want the results to show the background colour that I have selected for them. For example, if option 1 is selected, the cell would turn green, option 2, blue, etc. Is this possible, and if so, how, as my list will currently only display the text, and no colour? Kind regards |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
What do the underlined letters in the drop down menu's mean? | Excel Discussion (Misc queries) | |||
Drop Down menu's | Excel Discussion (Misc queries) | |||
Font Size in Drop Down Menu's | Excel Discussion (Misc queries) | |||
change a cell background colour to my own RGB colour requirements | Excel Discussion (Misc queries) | |||
Drop Down Menu's | Excel Discussion (Misc queries) |