muchas gracias por tu ayuda, debo confesar que ahora tengo mas de 1000 registros y aparte de buscar la celda en blanco debo comparar los datos con otra celda y aunque ya lo termine esta demasiado demorado y quisiera saber como hacerla mas eficiente. el código que llevo es el siguiente
Sub filtrar()
For i = 3 To 1048576
Sheets("APSC").Select
ActiveSheet.Unprotect
If Cells(i, 1) = Empty Then
GoTo a
Else
Cells(i, 1).Select
Selection.Locked = True
Cells(i, 2).Select
Selection.Locked = True
Cells(i, 3).Select
Selection.Locked = True
Cells(i, 4).Select
Selection.Locked = True
Cells(i, 5).Select
Selection.Locked = True
Cells(i, 6).Select
Selection.Locked = True
Cells(i, 7).Select
Selection.Locked = True
Cells(i, 8).Select
Selection.Locked = False
Selection.FormulaHidden = False
Cells(i, 9).Select
Selection.Locked = False
Selection.FormulaHidden = False
Cells(i, 10).Select
Selection.Locked = False
Selection.FormulaHidden = False
Cells(i, 11).Select
Selection.Locked = False
Selection.FormulaHidden = False
Cells(i, 12).Select
Selection.Locked = False
Selection.FormulaHidden = False
Cells(i, 13).Select
Selection.Locked = False
Selection.FormulaHidden = False
Cells(i, 17).Select
Selection.Locked = True
Cells(i, 12).Select
Selection.Locked = True
Cells(i, 13).Select
Selection.Locked = True
Cells(i, 14).Select
Selection.Locked = True
Cells(i, 15).Select
Selection.Locked = True
Cells(i, 16).Select
Selection.Locked = True
Cells(i, 17).Select
Selection.Locked = True
Cells(i, 18).Select
Selection.Locked = True
Cells(i, 19).Select
Selection.Locked = True
Cells(i, 20).Select
Selection.Locked = True
Cells(i, 21).Select
Selection.Locked = True
End If
If Cells(i, 4) <> Cells(i, 14) Then
Cells(i, 4).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
Cells(i, 14).Select
With Selection.Interior
.Pattern = xlSolid
.PatternColorIndex = xlAutomatic
.Color = 65535
.TintAndShade = 0
.PatternTintAndShade = 0
End With
End If
Next i
a:
Sheets("APSC").Select
ActiveSheet.Protect DrawingObjects:=False, Contents:=True, Scenarios:=True
End Sub
gracias por la ayuda