More than 3 conditional formats in Excel
Solved/Closed
Related:
- Conditional formatting graded color scale
- Notepad++ background color - Guide
- Sound card color code - Guide
- Pdf xchange scale - Guide
- Rg45 color coding - Guide
- Powertoys color picker download - Download - Other
1 response
rizvisa1
Posts
4478
Registration date
Thursday January 28, 2010
Status
Contributor
Last seen
May 5, 2022
766
Jul 26, 2010 at 12:24 PM
Jul 26, 2010 at 12:24 PM
By the power of search, using just the title of your question, i get https://ccm.net/s/More+than+3+conditional+formats+in+Excel
Jul 26, 2010 at 01:45 PM
Jul 26, 2010 at 02:22 PM
So now you should have
The second change you need to make is change this
MyPlage refered to the range where to color was to be applied. You change it to your requirement as for example
Now to Run this modifed macro. Of course you need to modify the conditions. Personally I am not a big fan of a lot of IFs
So instead of
you can have
Jul 26, 2010 at 02:36 PM
Private Sub ConditionalFormatAfterTheFact()
Set MyPlage = Range("C2:C8381")
For Each Cell In MyPlage
Select Case Target
Case 106576 To 154925
Cell.Interior.ColorIndex = 46
Case 235523 To 241668
Cell.Interior.ColorIndex = 46
Case 368764 To 397255
Cell.Interior.ColorIndex = 46
Case 413751 To 419523
Cell.Interior.ColorIndex = 46
Case 495867 To 519225
Cell.Interior.ColorIndex = 46
Case Else
Cell.Interior.ColorIndex = xlNone
End Select
Next
End Sub
and it did not work. What did I do wrong?
Jul 26, 2010 at 02:57 PM
Select Case Target
There is no "Target". There is "Cell"
Select Case Cell.Value
Jul 26, 2010 at 03:01 PM