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: 3
Default Excel 2003 with 6 Conditional Formatting

Hello,

I have rows of data ( a1:e1, a2:e2, a3:e3, etc.) I would like to put a
letter in column (f1: f100) that would change the background color of that
row of data ( a1:e1)

I think i have to use a WorkSheet_change event. I've found the following
code but don't understand how to change the background color for the row of
data. If i put R in f1 the row a1:e1 would change to red background.

Private Sub Worksheet_Change(ByVal Target As Range)

Dim icolor As Integer

If Not Intersect(Target, Range("F1:F100")) is Nothing Then

Select Case Target

Case Is = R
icolor = Red

Case Is =G
icolor = Green

Case Is = B
icolor = Blue

Case Is = Y
icolor = Yellow

Case Is = M
icolor = Magenta

Case Is = C
icolor = Cyan


End Select


Target.Interior.ColorIndex = icolor

End If


End Sub

Thanks
Brian

 
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 - Excel 2003 Neil Holden Excel Discussion (Misc queries) 2 February 4th 10 11:44 AM
conditional formatting in excel 2003 GrouchyMammy Excel Worksheet Functions 5 April 13th 09 03:05 AM
Conditional formatting in Excel 2003 Bruce McGinnis Excel Discussion (Misc queries) 3 October 16th 08 12:20 AM
Conditional Formatting - Excel 2003 Dan Excel Discussion (Misc queries) 3 September 9th 08 04:43 PM
Conditional formatting excel 2003 [email protected] Excel Worksheet Functions 1 April 14th 08 11:43 AM


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