Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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" wrote in message ups.com... 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? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using CF to change colour in cell based on date? | Excel Discussion (Misc queries) | |||
how do i change cell text colour based on value in other cell | Excel Worksheet Functions | |||
Saving current worksheet on cell value change | New Users to Excel | |||
How to change cell colour based on numer of months? | Excel Programming | |||
Change the colour of a bunch of cells, based on one cell. | Excel Programming |