Need to copy the format of a cell only if that cell is filled color


Posted by Veronica on February 26, 2001 10:02 AM

I need to copy the format of cell A1 to B10 but only if the cell A1 is formated with Fill Color. Thanks in advance.

Posted by Faster on February 26, 2001 2:25 PM

Sub CopyIf()
If Range("A1").Interior.ColorIndex = xlNone Then
Exit Sub
Else
Range("A1").Copy
Range("B10").PasteSpecial Paste:=xlFormats
Application.CutCopyMode = False
End If
End Sub



Posted by Veronica on February 26, 2001 8:30 PM

Thanks Faster; I wonder if there is a non-programable solution also?!?