LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Select Case for Conditional Formatting

I've tried using the following code or more than three conditional formats, but it doesn't work

Basically I want the background color to show red, green, yellow, or blue if the text in a cell says the same thing

"Red" text would = red backgroun
"Blue" text = blue backgroun

Any hints you can give me would be much apprepriated - Thank

***** - five stars to anyone willing to give some feedbac

Private Sub Worksheet_Calculate(
Dim oCell As Rang
For Each oCell In Range("BF261:BF276"
Select Case oCell.Valu
Case Is = Re
oCell.Interior.Pattern = xlColorIndexNon
oCell.Interior.PatternColorIndex =
Case Is = Blu
oCell.Interior.Pattern = xlColorIndexNon
oCell.Interior.PatternColorIndex =
Case Is = Gree
oCell.Interior.Pattern = xlColorIndexNon
oCell.Interior.PatternColorIndex =
Case Is = Ambe
oCell.Interior.Pattern = xlColorIndexNon
oCell.Interior.PatternColorIndex =
Case Is = Complet
oCell.Interior.Pattern = xlColorIndexNon
oCell.Interior.PatternColorIndex = 3
End Selec
Next oCel
End Su





 
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
Conditional formatting - case sensitive text Ron Excel Worksheet Functions 3 May 1st 09 04:01 AM
Case without Select Case error problem Ayo Excel Discussion (Misc queries) 2 May 16th 08 03:48 PM
Conditional Formatting based on Upper case cs_vision Excel Worksheet Functions 5 April 28th 06 08:37 PM
case sensitive conditional formatting Tel Excel Worksheet Functions 3 March 22nd 06 05:02 PM
Select Case Conditional Formatting Sub? RCW Excel Discussion (Misc queries) 2 February 5th 05 10:29 PM


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