LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35
Default Conditional Format for 3 Text possibilities

Team,

I have found this post by Gord Dibben and can get it to work using numbers
as the possible results
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("A1"))
' for a range use "A1:A10" or similar
On Error GoTo endit
Application.EnableEvents = False
If vRngInput Is Nothing Then Exit Sub
For Each rng In vRngInput
'Determine the color
Select Case rng.Value
Case Is = 1: Num = 6 'yellow
Case Is = 2: Num = 10 'green
Case Is = 3: Num = 5 'blue
Case Is = 4: Num = 3 'red
Case Is = 5: Num = 46 'orange
End Select
'Apply the color
rng.Interior.ColorIndex = Num
Next rng
endit:
Application.EnableEvents = True

End Sub


But I really want it to work for Text based events... nothing I do seems to
motivate the change though...


i.e
Case Is = "Martin": Num = 6 'yellow does not work
Case Is = Martin: Num = 6 'yellow does not work

Would it be because my cell is a formula ?

=VLOOKUP($B7,'CRT for FTE'!$A$7:$C$43,3,FALSE)

Thanks in advance..


 
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
Help With A Conditional Text Format Gatsby Excel Discussion (Misc queries) 5 February 16th 07 11:48 PM
conditional format for text Todd Excel Worksheet Functions 3 July 19th 06 09:12 PM
conditional format text - please help! Vivek New Users to Excel 4 March 5th 06 12:14 PM
Conditional w/ three possibilities MathDoctor Excel Discussion (Misc queries) 4 June 11th 05 03:45 PM
conditional format for text Kim Excel Worksheet Functions 7 November 3rd 04 04:33 PM


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

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"