You are on page 1of 8

Search web

Excel for
Beginners
Navigation Home Page -ExcelforBeginners-by Kristoff deCunha. > VBA CODES >
Home Page CONDITIONAL FORMATTING (More than 3 Criteria's)
-ExcelforBeginners-by
Kristoff deCunha.
CONDITIONAL FORMATTING (More than 3 Criteria’s)
Excel Formulas
VBA CODES Use & Explanation:
Miscellaneous
The steps below will show you how to do more than 3 conditional formattings in an excel sheet, which would otherwise allow
AVERAGE
you only 3 conditional formattings at any one time.
Average of
Average's The Cell colours will automatically change depending on the colour you have chosen for the Text or number you have
specified as the criteria.
AGE or TENURE
STEPS IN DETAIL
CHARTS
CONCATENATE STEP
CONDITIONAL  On a New Excel Sheet, go to Tools, then go to Macro, then go to Visual Basic Editor. (Or you can also simply skip the
FORMATTING step above and press the Alt key with the F11 key to open up the Visual Basic Editor)
CONDITIONAL
FORMATTING (More  

than 3 Criteria's)
CLEAN
DATE
GROUPS
IF-THEN
IF-
THEN(MULTIPLE)
IF-AND
IF-OR
PRODUCT(multipl
y)
SUM (add)
TRIM
TIME
CLOCK WITH
AUTOMATIC REFRESH
Vlookup
VALIDATION
SHORTCUT
KEYS
Sitemap
Dim oCell As Range

For Each oCell In Target

        Select Case oCell.Value

                 Case 1 To 3, "ABCD"

                 oCell.Interior.ColorIndex = 3

                 oCell.Font.Bold = True

                 Case Is = 4, "EFGH"

                 oCell.Interior.ColorIndex = 4

                 oCell.Font.Bold = True

                 Case 5 To 9, "IJKL"

                 oCell.Interior.ColorIndex = 5

                 oCell.Font.Bold = True

                 Case Is = 10

                 oCell.Interior.ColorIndex = 6
                 oCell.Font.Bold = True

                  Case Else

                 oCell.Interior.ColorIndex = xlNone

         End Select

    Next oCell

 End Sub

 
The Colour Table
  

53 52 51 49 55 56
1
9 46 12 10 5 47 16
3 45 43 50 41 13 48
7 44 6 4 33 54 15

You might also like