I didn't manage to do that. I used this code to create the titles:
Dim i As Long
For i = 1 To Sheets("Sheet1").Cells(Sheets("r").Rows.Count, "A").End(xlUp).Row
If Sheets("Sheet1").Range("D" & i) <> Sheets("Sheet1").Range("D" & i + 1) Then
Rows(i + 1).Insert shift:=xlShiftDown
Sheets("Sheet1").Range("A" & i + 1).Value = Sheets("Sheet1").Range("D" & i + 2).Value
With Sheets("Sheet1").Range("A" & i + 1)
.Font.Size = 10
.Font.Name = "Calibri"
.Font.Bold = True
.Font.Italic = False
.HorizontalAlignment = xlCenter
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorDark1
.TintAndShade = -0.249977111117893
.PatternTintAndShade = 0
End With
Range(Cells(i + 1, 1), Cells(i + 1, 11)).Merge
i = i + 1
End If
Next
Bookmarks