Thread
:
Conditional Formating with VBA help needed
View Single Post
#
1
Posted to microsoft.public.excel.programming
Don Guillett[_4_]
external usenet poster
Posts: 2,337
Conditional Formating with VBA help needed
Use a select case macro that is automatic. Modify to suit
right click sheet tabview codeinsert thisSAVE
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row 4 And Target.Column = 1 Then
Select Case Target.Value
Case "A"
Target.Interior.ColorIndex = 5
Case "S"
Target.Interior.ColorIndex = 6
Case "C"
Target.Interior.ColorIndex = 7
Case "I"
Target.Interior.ColorIndex = 8
Case Else
Target.Interior.ColorIndex = 0
End Select
End If
End Sub
--
Don Guillett
SalesAid Software
"Christian P" wrote in message
...
Hello all,
This is the first time i post here and first experience in Excel
programming, i have basic knowledge in VBA for access tho.
I am making worksheets that will be calendar.
Each worksheets are for individual months.
We will use it to see wich guy is where that day IE: annual leaves,
sick leaves, on a course, out for inspection etc...
What i want it to do is that if in a cell lets say 4 jan for joe blo,
we enter the letter A (for annual leave) the background will switch to
red. I know i can do that with conditional formatting but it is limited
to only 3 conditions, and i will have more options then that.
A for Annual
S for sick
C for course
I for inspection
ect....
Thanx for help.
Chris
------------------------------------------------
~~ Message posted from
http://www.ExcelTip.com/
~~View and post usenet messages directly from
http://www.ExcelForum.com/
Reply With Quote
Don Guillett[_4_]
View Public Profile
Find all posts by Don Guillett[_4_]