PC Review


Reply
Thread Tools Rate Thread

change current cell colour based on the value of adjacent cell on other worksheet

 
 
Rits
Guest
Posts: n/a
 
      23rd Nov 2006
I am currently working on one complicated excel spreadsheet. I wish to
change current cell colour based on the value of adjacent cell on other
worksheet. In simple words I have 2 worksheets. On worksheet 1 to
monitor the project status I am using conditional formatting. for
example if value of cell A1 is equal to Completed then cell colour
changes to GREEN if it's Hold then RED and if Progressing then
YELLOW. This is standard !!!

Now on 2nd worksheet I wish to monitor the value of the cell A1 on
worksheet 1 and if value changes from blank to Completed , Hold or
Progressing then I wish to change the colour of the cell B1 on
worksheet 2.

Is it possible to achieve this in Microsoft Excel? I will appreciate
if someone tell me how to do this?

 
Reply With Quote
 
 
 
 
Bob Phillips
Guest
Posts: n/a
 
      23rd Nov 2006
Private Sub Worksheet_Change(ByVal Target As Range)
Const WS_RANGE As String = "A1:A10" '<== change to suit

On Error GoTo ws_exit
Application.EnableEvents = False

If Not Intersect(Target, Me.Range(WS_RANGE)) Is Nothing Then
With Worksheets("Sheet2")
Select Case Target.Value
Case "Completed":
.Range(Target.Offset(0,1).Address(False,
False)).Interior.ColorIndex = 3
Case "Hold":
.Range(Target.Offset(0,1).Address(False,
False)).Interior.ColorIndex = 5
Case "Pending":
.Range(Target.Offset(0,1).Address(False,
False)).Interior.ColorIndex = 6
End Select
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click


--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Rits" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I am currently working on one complicated excel spreadsheet. I wish to
> change current cell colour based on the value of adjacent cell on other
> worksheet. In simple words I have 2 worksheets. On worksheet 1 to
> monitor the project status I am using conditional formatting. for
> example if value of cell A1 is equal to Completed then cell colour
> changes to GREEN if it's Hold then RED and if Progressing then
> YELLOW. This is standard !!!
>
> Now on 2nd worksheet I wish to monitor the value of the cell A1 on
> worksheet 1 and if value changes from blank to Completed , Hold or
> Progressing then I wish to change the colour of the cell B1 on
> worksheet 2.
>
> Is it possible to achieve this in Microsoft Excel? I will appreciate
> if someone tell me how to do this?
>



 
Reply With Quote
 
=?Utf-8?B?R2FyeScncyBTdHVkZW50?=
Guest
Posts: n/a
 
      23rd Nov 2006
Conditional formatting will not operate across worksheets. The usual
approach is to use a link..If you want to monitor celll A1 on Sheet1, then on
Sheet2 in any cell, say Z100, put a link to the Sheet1 cell and use Z100 for
the conditional formatting reference.
--
Gary's Student


"Rits" wrote:

> I am currently working on one complicated excel spreadsheet. I wish to
> change current cell colour based on the value of adjacent cell on other
> worksheet. In simple words I have 2 worksheets. On worksheet 1 to
> monitor the project status I am using conditional formatting. for
> example if value of cell A1 is equal to Completed then cell colour
> changes to GREEN if it's Hold then RED and if Progressing then
> YELLOW. This is standard !!!
>
> Now on 2nd worksheet I wish to monitor the value of the cell A1 on
> worksheet 1 and if value changes from blank to Completed , Hold or
> Progressing then I wish to change the colour of the cell B1 on
> worksheet 2.
>
> Is it possible to achieve this in Microsoft Excel? I will appreciate
> if someone tell me how to do this?
>
>

 
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
how do i change cell text colour based on value in other cell Oscarrot Microsoft Excel Worksheet Functions 2 20th Jul 2009 03:21 PM
Change 3rd cell colour based on cell 1 >= cell2 in range wombarrapete Microsoft Excel Discussion 8 21st Dec 2008 09:41 PM
Auto colour based on adjacent cell crapit Microsoft Excel Discussion 5 13th Sep 2008 04:14 PM
How to change the colour of a cell(s) based on cell value Artful Dodger Microsoft Excel Discussion 6 26th Nov 2004 09:34 PM
Need a cell to change colour based upon a word in another cell =?Utf-8?B?Y29va2ll?= Microsoft Excel Misc 4 11th Nov 2004 05:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:47 PM.