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

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.

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
 

Forum statistics

Threads
1,148,030
Messages
5,744,406
Members
423,868
Latest member
Junior107

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
Top