What is the syntax to change font color?

'method 1
Cells(<row number>, <column number>).Font.ColorIndex = <color index integer>

'method 2
Range(“<cell reference>”).Font.ColorIndex = <color index integer>
‘examples
Cells(2,4).Font.ColorIndex = 5
Range(“D2”).Font.ColorIndex = 2

 

Advertisements

What is the syntax to format a cell?

Range(“<cell reference>”).Font.Bold=<true or false>
Range(“<cell reference>”).Font.Underline=<true or false>
Range(“<cell reference>”).Font.Color=<rgb color>
‘examples
Range(“A1”).Font.Bold=True
Range(“A1”).Font.Underline=true
Range(“A1”).Font.Color=rgbNavy