Conditional Formatting > 3 code to highlight a row

ashlad

Board Regular
Joined
Aug 22, 2002
Messages
56
Guys,

I know this has been touched on many times, but I have trawled the site unable to find a solution. I need more than 3 conditions within a conditional format - hence am using a bit of code in the sheet. I need to colour the row when a condition in a cell in the same row is met (through a validation list)

Please can someone help with the code, I am not a programmer so be kind.

I have used the following and tried to adapt it with my limited vb understanding, but it only changes the colour of the cell - how do I do the row?

For Each c In Worksheets("Issues Log").Range("M6:M2000")
If c.Value = "a" Then c.Interior.ColorIndex = 1
If c.Value = "b" Then c.Interior.ColorIndex = 2
If c.Value = "c" Then c.Interior.ColorIndex = 3
If c.Value = "d" Then c.Interior.ColorIndex = 4
If c.Value = "e" Then c.Interior.ColorIndex = 5
If c.Value = "f" Then c.Interior.ColorIndex = 6
Next c


Thanks in advance
 

Some videos you may like

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

ashlad

Board Regular
Joined
Aug 22, 2002
Messages
56
Thanks that worked. The next statement caused a bit of a lull as you moved out of the cell. So i changed the c to target and removed the next statement. This worked well.

Thanks for the help
 

Watch MrExcel Video

Forum statistics

Threads
1,118,079
Messages
5,570,082
Members
412,310
Latest member
mark884
Top