Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is coded for data entry on column A. Put this event macro in the
worksheet code area: Private Sub Worksheet_Change(ByVal Target As Range) codes = ("V,F,A,OC,CO,O1,O2,O3,O4,O5,O6,O7,O8") Acodes = Split(codes, ",") Set t = Target Set a = Range("A:A") If Intersect(t, a) Is Nothing Then Exit Sub v = t.Value For i = LBound(Acodes) To UBound(Acodes) If v = Acodes(i) Then t.Interior.ColorIndex = i End If Next End Sub -- Gary''s Student - gsnu200828 "OsmoseTom" wrote: I need some help. I need to change the color of a cell based on values from a list. The list options are V, F, A, OC, CO, O1, O2, O3, O4, O5, O6, O7, & O8. Each option would have to be a different color. Can this be done using VB code for the current worksheet? If so how? Thanks... |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Setting multiple conditions to return a figure from multiple cells | Excel Discussion (Misc queries) | |||
SUMPRODUCT or INDEX/MATCH for multiple conditions and multiple rec | Excel Discussion (Misc queries) | |||
Copy multiple collumns with multiple conditions. | Excel Programming | |||
Combining Text from multiple cells under multiple conditions | Excel Worksheet Functions | |||
How to multiple conditions to validate more than 2 conditions to . | Excel Worksheet Functions |