Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Conditional Formating with VBA help needed


Hello all,

This is the first time i post here and first experience in Exce
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 t
red. I know i can do that with conditional formatting but it is limite
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.

Chri

-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default 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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Formating Help Needed. doss04 Excel Discussion (Misc queries) 3 November 20th 08 08:18 AM
Conditional Formating and Mid Wanna Learn Excel Discussion (Misc queries) 2 April 14th 08 04:07 PM
Install dates formating using conditional formating? Jerry Eggleston Excel Discussion (Misc queries) 2 November 9th 05 05:49 PM
Conditional formating help needed PCOR Excel Worksheet Functions 2 August 25th 05 04:43 AM
Conditional formating? dbrumit Excel Discussion (Misc queries) 10 May 13th 05 03:33 PM


All times are GMT +1. The time now is 12:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"