I am trying to write some VBA (in Excel 2016) to look for USD currency values in a range of cells and change the cell format to GBP. The code below spots the USD cells (i.e. the If statement is reached, but the cells remain formatted as "$n.nn". Could anyone explain what I'm doing wrong?
VBA Code:
Sub ChangeCurrency()
Dim cl As Range
For Each cl In Intersect(ActiveSheet.Range("C24:I26"), ActiveSheet.UsedRange)
If InStr(1, cl.Text, "$") > 0 Then
cl.Style = "Currency"
cl.NumberFormat = "[$£-809]#,##0.00"
End If
Next cl
End Sub