Bordear celdas en hoja excel
Para elsa:
'**************** colorear hoja 'pistadia' según comparación con Hoja1
Application.ScreenUpdating = False
'quitar colores anteriores en hoja pistadia
Sheets("pistadia").Select
[A1].Select
With ActiveSheet.UsedRange.Interior
.Pattern = xlNone
.TintAndShade = 0
.PatternTintAndShade = 0
End With
'ubica la última celda de la hoja
ActiveCell.SpecialCells(xlLastCell).Select
R = ActiveCell.Row
c = ActiveCell.Column
For xc = 1 To c
For xr = 1 To R
If Len(Cells(xr, xc)) > 0 Then
Cells(xr, xc).Select
'buscar en Hoja1 en lugar de Hoja2 'ver tipo de número
igual = Application.WorksheetFunction.CountIf(Worksheets("Hoja1").Range("O:O"), ActiveCell.Value)
If igual > 0 Then
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.ThemeColor = xlThemeColorAccent4
.TintAndShade = 0.399975585192419
.PatternTintAndShade = 0
End With
End If
End If
Next xr
Next xc
'MsgBox "Fin proceso pistadia"
End Sub
1 respuesta
Respuesta de Elsa Matilde
2