How to use drop box selection to change cell color.

arcticman141

New Member
Joined
Apr 16, 2011
Messages
5
Howdy.. I am sure this has been answered somewhere, but after four hours of surfing I can't seem to get it. So

I need to have a drop box selection change the color of the cell, but not change the value of it. The options in the drop box will be text but I need the result to be a change of color in target cell. Also need to have other options change the text color only of the cell. I am pretty new with excel, have spent alot of time tonight researching to no avail. I am running excel 2000 but have access to 2007 also. And need this to run on multiple cells. I have created the drop box cells F1-F5 using Data Validation -> List, Example of what I'm looking for

Cell A1= 16

Drop Box Option- Tardy = Change A1 to Red Background
Drop Box Option- Absent = Change A1 to Yellow Background
Drop Box Opton - Attended = Change A1 to Blue Background
Drop Box Opton - 5th = Change A1 to Blue Text
Drop Box Opton - 6th = Change A1 to Red Text

Your help is much appreciated.
 
Hello again

Do you mean something like this.
Excel Workbook
ABCDEFGH
116AttendedTardy
2Absent
3Attended
45th
56th
Sheet1
Excel 2010

With your sheet set out lik the above use the code below.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("F1")) Is Nothing Then Exit Sub
With Range("A1")
    Select Case Target.Value
        Case "Tardy": .Interior.ColorIndex = 3
        Case "Absent": .Interior.ColorIndex = 6
        Case "Attended": .Interior.ColorIndex = 5
        Case "5th": .Font.ColorIndex = 5
        Case "6th": .Font.ColorIndex = 3
    End Select
End With
End Sub
 
Upvote 0

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,224,521
Messages
6,179,290
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top