Sub WorksheetChange() 'WorksheetChange() ' The following macro will do the more then 3 conditions based on the selected cell ' range. ' ' This was originally written for MBA 612. ' ' For full details (and screenshots) visit: ' http://www.j5studios.com/projects/excel/ ' ' ' Created by Justin Ribeiro - J5 Studios ' Email: ribeiro@j5studios.com ' Web: http://www.j5studios.com/ ' Date: 10/01/2004 ' Conditional Formatting for more than 3 conditions ' Setup our var for the selected range Dim oCell As Range ' First Loop For Each oCell In Selection ' Grab the selected cell range...don't ask Dim cl As Range ' Second Loop For Each cl In oCell ' The Case - Grab the text of the cell Select Case cl.Text ' Condition 1 Case 1 To 1000 ' Change Background Color cl.Interior.ColorIndex = 56 ' Condition 2 Case 1001 To 1100.9 cl.Interior.ColorIndex = 28 ' Condition 3 Case 1101 To 1200.9 cl.Interior.ColorIndex = 48 ' Condition 4 Case 1201 To 1300.9 cl.Interior.ColorIndex = 24 ' Condition 5 Case 1301 To 1325.9 cl.Interior.ColorIndex = 15 ' Condition 6 Case 1326 To 1350.9 cl.Interior.ColorIndex = 26 ' Condition 7 Case 1351 To 1375.9 cl.Interior.ColorIndex = 16 ' Condition 8 Case 1376 To 1400.9 cl.Interior.ColorIndex = 30 ' No more cases End Select ' Go to the next cell Next cl 'Go to the next range Next End Sub