excelmatrixcolorsconditional-formattingdiagonal

How can I colour the main diagonal in Excel?


I have an excel table in which a correlation matrix is represented.

I want to paint the main diagonal (A1, B2, C3...) in blue.

The amount of rows is huge, so I cannot just format them manually.

I have found this thread in which the author shows some code which does this. However, I don't undersstand it. I am a basic excel user, so I don't understand how to implement it.

Any help is appreciated.


Solution

  • I used conditional formatting like so:

    On a Mac with Office 365

    enter image description here

    On a pc with Office 365:

    enter image description here