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
 

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).
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
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,255
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top