Option Explicit
Sub Copia_Incolla()
Dim CelleC As Range
Dim cella As Variant
Set CelleC = Range("I9:Q10")
Dim R_C As String
For Each cella In CelleC
If cella.Interior.ColorIndex <> xlNone Then
R_C = cella.Address()
Exit For
End If
Next
Range("A28:H29").Select
With Selection.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
Selection.Borders(xlEdgeLeft).LineStyle = xlNone
Selection.Borders(xlEdgeTop).LineStyle = xlNone
Selection.Borders(xlEdgeBottom).LineStyle = xlNone
Selection.Borders(xlEdgeRight).LineStyle = xlNone
Selection.Borders(xlInsideVertical).LineStyle = xlNone
Selection.Borders(xlInsideHorizontal).LineStyle = xlNone
Range(R_C & ":Q10").Select
Selection.Copy
Range("A28").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Set CelleC = Nothing
End Sub
|