Hi There,
Thanks for the reply, I found another makro doing conditional format with more than 3 conditions...BUT it does not work. Where in the code do I have to insert the desired range?
Here is the code (found at http://www.geocities.com/davemcritchie/excel/colors.htm):
Sub ColorRowBasedOnCellValue()
'David McRitchie, 2001-01-17 programming -- Color row based on value
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim cell As Range
For Each cell In Intersect(Selection, ActiveCell.EntireColumn, _
ActiveSheet.UsedRange
Select Case cell.Value
Case Is >= 50
cell.EntireRow.Interior.colorindex = 20
Case Is >= 40
cell.EntireRow.Interior.colorindex = 37
Case Is >= 20
cell.EntireRow.Interior.colorindex = 38
Case Is >= 0
cell.EntireRow.Interior.colorindex = 36
Case Else
cell.EntireRow.Interior.colorindex = 44
End Select
Next cell
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = False
End Sub
Thanks for the reply, I found another makro doing conditional format with more than 3 conditions...BUT it does not work. Where in the code do I have to insert the desired range?
Here is the code (found at http://www.geocities.com/davemcritchie/excel/colors.htm):
Sub ColorRowBasedOnCellValue()
'David McRitchie, 2001-01-17 programming -- Color row based on value
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim cell As Range
For Each cell In Intersect(Selection, ActiveCell.EntireColumn, _
ActiveSheet.UsedRange
Select Case cell.Value
Case Is >= 50
cell.EntireRow.Interior.colorindex = 20
Case Is >= 40
cell.EntireRow.Interior.colorindex = 37
Case Is >= 20
cell.EntireRow.Interior.colorindex = 38
Case Is >= 0
cell.EntireRow.Interior.colorindex = 36
Case Else
cell.EntireRow.Interior.colorindex = 44
End Select
Next cell
Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = False
End Sub