I have an Excel file with a table containing values O and G. I want to replace O with an orange icon and G with a green icon
How do I read each cell for value O and G and replace them with their respective image?
Private Sub CommandButton1_Click()
For Each c In Worksheets("Summary (2)").Range("A1:D10")
If c.Value = 0 Then
c.Value = Orange
ElseIf c.Value = G Then
c.Value = "Green"
Else
c.Value = ""
End If
Next c
End Sub