Here's a macro you can run as needed to color the columns.
To install it you can click Alt + F11 and in the window that comes up choose insert from the drop down menus and choose module.
Then paste the code into the window. Save the workbook as a .xlsm style file and then run the macro.
Option Explicit
Const cGrey = 10921638
Const cOrange = 49407
Sub ColorCells()
Dim lr As Long
Dim lc As Long
Dim wsMD As Worksheet
Dim c As Long
Set wsMD = Worksheets("Matching date")
lr = wsMD.Cells(Rows.Count, 2).End(xlUp).Row
lc = wsMD.Cells(4, Columns.Count).End(xlToLeft).Column
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For c = 2 To lc
With wsMD
If .Cells(4, c).Value = "Timestamp" Then
.Range(.Cells(3, c), .Cells(lr, c)).Interior.Color = cGrey
ElseIf .Cells(4, c).Value = "Trade Close" Then
.Range(.Cells(3, c), .Cells(lr, c)).Interior.Color = cOrange
End If
End With
Next c
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
End Sub
Bookmarks