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: 12
Default Colors in Columns

Can anyone tell me what is wrong with this code.
It colors columns D, E and F with Blue, Red and Green.

But I want ONLY ColumnD colored Blue if D75 = "A" and E75
and F75 are blank. ONLY ColumnE colored Red if E75 = "B"
and A75 and F75 are blank and ONLY ColumnF colored Green
if F75 = "C" and D75 and E75 are blank. As it is all
columns are colored. The non colored columns should be
black.
Is there a better way to write this code?

If Range("D74") = "A" And _
Range("E74") = "" And Range("F74") = "" Then
Range("D75.D176").Select
Selection.Font.ColorIndex = 5
End If
If Range("E74") = "B" And _
Range("D74") = "" And Range("F74") = "" Then
Range("E75.E176").Select
Selection.Font.ColorIndex = 3
End If
If Range("F74") = "C" And _
Range("D74") = "" And Range("E74") = "" Then
Range("F75.F176").Select
Selection.Font.ColorIndex = 10
End If
 
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
Used drawing colors in shapes....lost default colors for "Fill Col Lai704 Excel Discussion (Misc queries) 1 August 20th 08 04:45 AM
Worksheet formatting (fill colors & text colors) disappeared sweettooth Excel Discussion (Misc queries) 2 June 24th 08 01:16 AM
Lost highlighting and font colors; background colors on web pages Jan in Raleigh Excel Discussion (Misc queries) 2 July 31st 07 09:10 PM
Can I sort columns by colors, example - red, green, yellow Beth Excel Discussion (Misc queries) 3 May 19th 06 05:34 AM
Colors of columns after sorting data in the supporting table Booger_Boy Charts and Charting in Excel 6 January 24th 05 02:41 PM


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