forked from Vitosh/VBA_personal
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathConditionalFormat.vb
34 lines (28 loc) · 1004 Bytes
/
ConditionalFormat.vb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Sub ListAllConditionalFormat()
Dim cf As FormatCondition
Dim ws As Worksheet
Dim l As Long
Dim rngCell As Range
On Error Resume Next
Application.EnableEvents = False
Application.ScreenUpdating = False
tblReport.Cells.Clear
For Each ws In ThisWorkbook.Worksheets
Debug.Print ws.Name
For Each cf In ws.Cells.FormatConditions
l = 1 + l
With tblReport
Set rngCell = .Cells(l, 1)
rngCell = cf.AppliesTo.Address
rngCell.Offset(0, 1) = cf.Type
rngCell.Offset(0, 2) = "'" & cf.Formula1
rngCell.Offset(0, 3) = cf.Interior.Color
rngCell.Offset(0, 4) = cf.Font.Name
rngCell.Offset(0, 5) = ws.Name
rngCell.Offset(0, 6) = "'" & cf.AppliesTo.AddressLocal
rngCell.Offset(0, 7) = "'" & cf.Formula2
End With
Next cf
Next ws
Debug.Print "END!"
End Sub