conditional format with more than 3 conditions

durul

New Member
Joined
Jan 28, 2005
Messages
2
Hello,

I want to make conditional formatting but i have more than 3 conditions. Ie if the cell value is between 0 and 1 i need a diferent format and if it is between 1 and 2 an other an goes on like this. Total number of conditions should be 6. Any possibility to do it with conditional formatting or should i use something else?

Thanks
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
You could try assigning a macro like this to the workbook change event or to a button?

Sub Macro2()

Dim MYVALUE As Long
Select Case MYVALUE

Case 1
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With

Case 2
With Selection.Interior
.ColorIndex = 8
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With

Case 3
With Selection.Interior
.ColorIndex = 12
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With

Case 4
With Selection.Interior
.ColorIndex = 16
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With

Case 5
With Selection.Interior
.ColorIndex = 20
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With

Case Else
With Selection.Interior
.ColorIndex = 24
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
End With

End Select

End Sub
 
Upvote 0
thanks but if i want the macro to execute the same in subsequent cells in a column and format according to the value of the cells.
 
Upvote 0
simply select the whole column before you run the macro.

If the column will always be the same or there is some consistent way of identifying the column then you can set the macro to do this automatically.
 
Upvote 0

Forum statistics

Threads
1,203,491
Messages
6,055,727
Members
444,814
Latest member
AutomateDifficulty

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