Introduction
Conditional Formatting (CF) is a tool that allows you to apply formats to a cell or range of cells. You can also use VBA to create instances of FormatCondition objects with conditional formatting and add these to the FormatConditions collection.
Remember that Conditional Formatting is the same as adding one or more formulas to each cell in which you use it, so applying Conditional Formatting to a large number of cells may cause performance degradations. Use caution when applying to to large ranges. I have managed to get X to Z working, courtesy of code that someone else produced and I have tweaked, but am finding it difficult to add another range.
Example
Assume that you have a table which contain
names and point of the authors of the c-sharpcorner.com like the below figure
and we are going to implement conditional formatting on the table:

Now write the following code in visual basic
for application code window:
Private
Sub Formatting()
Dim i, count As
Integer
For i = 1
To 10
If Cells(i, 2).Value > 10000
Then
count = count + 1
Cells(i, 2).Font.ColorIndex = 3
Cells(i, 3).Value = "Platinum
Member"
ElseIf Cells(i, 2).Value > 5000
And Cells(i, 2).Value < 10000
Then
Cells(i, 2).Font.ColorIndex = 46
Cells(i, 3).Value = "Gold Member"
ElseIf Cells(i, 2).Value > 500
And Cells(i, 2).Value < 5000
Then
Cells(i, 2).Font.ColorIndex = 48
Cells(i, 3).Value = "Silver Member"
Else
Cells(i, 2).Font.ColorIndex = 53
Cells(i, 3).Value = "Bronze Member"
End If
Next i
End Sub


Join the conversation! Your thoughts help the community grow.