I have generated code that allows you to use icon conditional formating based on absolute values (sample of record macro below).

I want to make the conditions based on the value in another cell.
I have done this reference to other cells with fill colors, but would like to do it with icons.
Thanks


Sub Macro2()
'
' Macro2 Macro
'

'
Selection.FormatConditions.AddIconSetCondition
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1)
.ReverseOrder = False
.ShowIconOnly = False
.IconSet = ActiveWorkbook.IconSets(xl5ArrowsGray)
End With
With Selection.FormatConditions(1).IconCriteria(2)
.Type = xlConditionValuePercent
.Value = b2
.Operator = xlEqual
End With
With Selection.FormatConditions(1).IconCriteria(3)
.Type = xlConditionValuePercent
.Value = 40
.Operator = 7
End With
With Selection.FormatConditions(1).IconCriteria(4)
.Type = xlConditionValuePercent
.Value = 60
.Operator = 7
End With
With Selection.FormatConditions(1).IconCriteria(5)
.Type = xlConditionValuePercent
.Value = 80
.Operator = 7
End With
Selection.FormatConditions(1).ScopeType = xlSelectionScope
Range("C6").Select
End Sub