Hi Folks,
I have placed a conditional format in cell G5 in a pivot table as part of a macro. I then want the format to be painted to all the cells in column G in the pivot table. The number of rows in the pivot table will vary.

Essentially, if column D contains “GBP” I want the format of cells in column G to be in GBP. If column D contains “USD” I want the cells in column G to be in USD.
The problem I have is that the initial cell formats Ok but the painter doesn’t work when I run the macro. The macro stops running when it hits this stage:
This process is part of a larger macro but I have recreated my problem and the following is the code but just for the GBP.
Can anyone help?

Sub Macro11()
' Macro11 Macro
' Keyboard Shortcut: Ctrl+Shift+V
Selection.NumberFormat = "$#,##0.00_);[Red]($#,##0.00)"
Selection.FormatConditions.Add Type:=xlExpression, Formula1:= _
Selection.FormatConditions(1).StopIfTrue = False
Selection.FormatConditions(1).ScopeType =xlSelectionScope
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
End Sub