Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Min Min is offline
external usenet poster
 
Posts: 40
Default Change cell colour

How can I make a cell change colour according to the result of its LOOKUP
formula?
I have put in the following code, but this will only work on cells that
don't have the formula, whereas I need the cells to change colour according
to the result of the formula.
Hope this makes sense!

Dim color As Integer

If Not Intersect(Target, Range("c1:c10")) Is Nothing Then
Select Case Target
Case 3 To 17
color = 3
Case 19
color = 45
Case 21
color = 4
Case 23 To 35
color = 33
Case Else
'Whatever
End Select

Target.Interior.ColorIndex = color
End If
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default Change cell colour

Worksheet_Change does NOT fire if the change is result of a formula
calculation.

"Min" wrote:

How can I make a cell change colour according to the result of its LOOKUP
formula?
I have put in the following code, but this will only work on cells that
don't have the formula, whereas I need the cells to change colour according
to the result of the formula.
Hope this makes sense!

Dim color As Integer

If Not Intersect(Target, Range("c1:c10")) Is Nothing Then
Select Case Target
Case 3 To 17
color = 3
Case 19
color = 45
Case 21
color = 4
Case 23 To 35
color = 33
Case Else
'Whatever
End Select

Target.Interior.ColorIndex = color
End If

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
Change colour of cell if there is no value Jennifer1960 Excel Worksheet Functions 2 August 20th 06 01:05 AM
change row colour when a value is given in a cell Alex Simpson Excel Worksheet Functions 8 August 8th 06 01:46 PM
change a cell background colour to my own RGB colour requirements Stephen Doughty Excel Discussion (Misc queries) 4 June 16th 06 01:08 PM
Change cell colour cityfc Excel Worksheet Functions 2 November 12th 05 10:58 AM
COLOUR CHANGE IS A CELL Mav Excel Discussion (Misc queries) 1 April 23rd 05 11:22 AM


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

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

About Us

"It's about Microsoft Excel"