PC Review


Reply
Thread Tools Rate Thread

Change cell colour on formula result change, no conditional format

 
 
roster_jon
Guest
Posts: n/a
 
      2nd Dec 2008
Hey everyone and many thanks in advance!!

I am creating a monthly roster for work. In one sheet I have the monthly
roster with all the employees down the side and the days across the top. In
the middle I have made it so that when a two letter code is entered into that
cell it does the following:
1. A macro I found on the discussion group changes the colour of the cell.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim Num As Long
Dim rng As Range
Dim vRngInput As Variant
Set vRngInput = Intersect(Target, Range("tasks"))
If vRngInput Is Nothing Then Exit Sub
For Each rng In vRngInput
'Determine the color
Select Case rng.Value
Case Is = "nr": Num = 6
Case Is = "nw": Num = 6
Case Is = "rd": Num = 6
Case Is = "al": Num = 6
Case Is = "lw": Num = 6
Case Is = "tr": Num = 6
Case Is = "wc": Num = 6
Case Is = "ph": Num = 6
Case Is = "ll": Num = 6
Case Is = "ol": Num = 6
Case Is = "pa": Num = 15
Case Is = "ra": Num = 16
Case Is = "pc": Num = 13
Case Is = "cf": Num = 14
Case Is = "cr": Num = 3
Case Is = "ci": Num = 33
Case Is = "rc": Num = 35
Case Is = "cb": Num = 46
Case Is = "fp": Num = 44
Case Is = "fr": Num = 11
Case Is = "cw": Num = 38
Case Is = "fw": Num = 39
Case Is = "lc": Num = 41
Case Is = "ff": Num = 34
Case Is = "ft": Num = 25
End Select
'Apply the color
rng.Interior.ColorIndex = Num
Next rng
End Sub

2. A lookup function returns the full task name into that days roster in a
separate sheet, next to the employees name.

=LOOKUP('Monthly Team Roster'!B6,'Monthly Team Roster'!$AL$6:$AL$31,'Monthly
Team Roster'!$AM$6:$AM$31)

-----------------------

Now what I want to do is when I say enter ci into B6 in the sheet Monthly
Team Roster it will update C6 in sheet A Monday to Inventory and change the
cell colour to a light blue (33).

Is it possible to have a macro to do this? As work only has excel 2000 and
it is limited to 3 conditional formats and I can't install the add on for 30
conditional formats because I'm not allowed to and it would then have to be
installed on all the computers at work.

I have scoured these discussion groups for many hours but could not find
anything.

Thanks again 1000 times!!!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional format to change row colour Jenny P Microsoft Excel Misc 1 24th May 2010 05:39 PM
Conditional format Font Type(not colour) change frankod Microsoft Excel Misc 2 24th Jun 2008 03:37 AM
How to change a cell colour depending on the result? Vokaj Microsoft Excel Programming 1 22nd Nov 2006 05:37 PM
Conditional Format - Formula to Colour Every 3rd Cell in Offset Range Sam via OfficeKB.com Microsoft Excel Misc 7 13th Aug 2005 04:19 AM
Conditional format - change cell colour according to the text within it Ian R Microsoft Excel Worksheet Functions 2 3rd Jun 2004 09:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:16 AM.