Please help me, as I am not very experienced with VBA.
Let's say I have the following cells with specific background colour as defined by conditional formatting. (Cells A3:A6)
Now I would like cells (C3:C6) to copy the colour from A3:A6 and apply it to C3:C6.
Please help me get a code that will recognize the colour set from Conditional formatting and change C3:C6 respectively. Thank you very much.
EDIT:I messed up and didn't enter any values for cells so it may be confusing how is there conditional formatting when nothing is in the cell. Assume cells with colours are 1-5.
Current code:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim xSRg, xDRg, xISRg, xIDRg As Range
Dim xFNum As Long
On Error Resume Next
Set xSRg = Sheet1.Range("A3:A5")
Set xDRg = Sheet1.Range("C3:C6")
For xFNum = 1 To xSRg.Count
Set xISRg = xSRg.Item(xFNum)
Set xIDRg = xDRg.Item(xFNum)
xIDRg.DisplayFormat.Interior.Color = xISRg.DisplayFormat.Interior.Color
Next xFNum
End Sub