Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Conditional Formatting
 
Posts: n/a
Default Multiple Contional Formatting


MY PROBLEM IS THAT I used drop down when i select the name jhe the color
does not change please help.

If you could give me other macro I would appreciate it.
Thanks


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim icolor As Integer
If Not Intersect(Target, Range("A1:c10")) Is Nothing Then
Select Case Target
Case "jhe"
icolor = 6
Case "mikoy"
icolor = 22
Case "mik"
icolor = 7
Case "gina"
icolor = 53
Case "gary"
icolor = 15
Case "fen"
icolor = 42
Case Else
'Whatever
End Select
Target.Interior.ColorIndex = icolor
End If
End Sub

  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

Excel97?

If so, set a cell to point at the DD cell, and test that in the Calculate
event

Private Sub Worksheet_Calculate()
Dim icolor As Integer
With Worksheets("Sheet1").Range("H1")
Select Case .Value
Case "jhe"
icolor = 6
Case "mikoy"
icolor = 22
Case "mik"
icolor = 7
Case "gina"
icolor = 53
Case "gary"
icolor = 15
Case "fen"
icolor = 42
Case Else
'Whatever
End Select
.Interior.ColorIndex = icolor
End If
End Sub


--
HTH

Bob Phillips

"Conditional Formatting"
wrote in message ...

MY PROBLEM IS THAT I used drop down when i select the name jhe the color
does not change please help.

If you could give me other macro I would appreciate it.
Thanks


Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim icolor As Integer
If Not Intersect(Target, Range("A1:c10")) Is Nothing Then
Select Case Target
Case "jhe"
icolor = 6
Case "mikoy"
icolor = 22
Case "mik"
icolor = 7
Case "gina"
icolor = 53
Case "gary"
icolor = 15
Case "fen"
icolor = 42
Case Else
'Whatever
End Select
Target.Interior.ColorIndex = icolor
End If
End Sub



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
how to select multiple text boxes in excel for formatting Rob New Users to Excel 3 April 2nd 23 08:38 PM
Eliminate formatting dulication in multiple worksheets jcorboy Excel Worksheet Functions 1 June 18th 05 11:43 PM
Copy conditional formatting across multiple rows? Gil Excel Discussion (Misc queries) 1 January 11th 05 11:27 AM
background formatting across multiple cells Casper Excel Discussion (Misc queries) 0 November 26th 04 11:18 AM
How do I use conditional formatting for multiple rows? Jim Johnson Excel Worksheet Functions 1 October 30th 04 03:36 AM


All times are GMT +1. The time now is 07:15 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"