Color Rows Automatically

  • Thread starter Thread starter Scott V.
  • Start date Start date
S

Scott V.

Hello,
I would like to set a parameter so that when a certain
cell reaches a given value the entire row will turn a
specific color or be stricken through. Example is below...

Completed...... Strikethrough
In Progress...... Green
Not Started...... Blue
Started........ Yellow

I have tried to use the conditional formatting and that
works well but is limited by only the current cell, vs the
entire row and this causes a reading issue. Is there an
answer for this?

Any and all help will be greatly appreciated.

Thanks,

Scott
 
Conditional formatting works fine with the entire row if you apply
conditional formatting to the entire row.

Instead of using Cell Value is, you have to change the selection to Formula
is and then enter a formula that will make the proper determination. for
example if I am formatting Cell B2 and I want it dependent on the value in
M2

formula is =$M2>25

You select all the cells at once, assume A2 is the active Cell (construct
the formula to work with the active cell)

Formula is =$M2>25

will be properly applied to all the cells. The column is Fixed to look at
M, but the row is adjusted to the appropriate row relative to the
activecell.
 
The good news is
You can use conditional formatting on more than one cell. Either select the
cells first and
formula is =$A$3>4 and set format.
OR do it for one and copy. The trick here is the $'s to make the reference
absolute.

The bad news is that you are restricted to 3 conditional formats so you need
a macro like this which you would need to modify to suit your needs.

Sub Progresscolor()
With ActiveCell.EntireRow.Interior
Select Case [a14]
Case 1: .ColorIndex = 4
Case 2: .ColorIndex = 5
Case 3: .ColorIndex = 6
Case 4: .ColorIndex = 7
Case Else: .ColorIndex = xlNone
End Select
End With
End Sub
 
Back
Top