ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conditional Formatting - Color row based on one cell value (https://www.excelbanter.com/excel-programming/400691-conditional-formatting-color-row-based-one-cell-value.html)

Monica

Conditional Formatting - Color row based on one cell value
 
I need to color code a row (10 columns) based on the value in column a being
a specific job name or number (8 to choose from). Conditional formatting
only allowed 3 conditions and only worked on individual cells.

GerardV

Conditional Formatting - Color row based on one cell value
 
For more than 3 formats I use somthing like:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Select Case Cells(1.1).Value
Case 1
Range("A1:J1").Interior.ColorIndex = 35
Range("A1:J1").Font.Bold = False
Case "Gerard"
Range("A1:J1").Interior.Color = RGB(255, 0, 0)
Range("A1:J1").Font.Bold = True
Case Else
Range("A1:J1").Interior.Color = RGB(255, 255, 255)
Range("A1:J1").Font.Bold = False
End Select

End Sub


--
Groeten / Greetings,

Gerard


"Monica" wrote:

I need to color code a row (10 columns) based on the value in column a being
a specific job name or number (8 to choose from). Conditional formatting
only allowed 3 conditions and only worked on individual cells.



All times are GMT +1. The time now is 08:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com