Jump to content

modificar macro que en lugar de borrar contenido lo pinte.


Recommended Posts

buenas a todos, tengo una macro que me funciona excelente gracias a la ayuda de macroantonio si mal no recuerdo, ahora necesitaria modificar la misma para que en vez de borrar me pinte lo que coincide en la busqueda, intente pero realmente no me sale, yo necesitaria que en vez de borrar en dos columnas pinte solo la tercera.

copio la macro para ver si me pueden dar una mano, gracias.


Sub FRANCOSIGUIENTE()
Dim colDia As Integer, LR As Long
Dim C As Range, D As Range, Rng As Range

Application.ScreenUpdating = False
With Hoja1
.[ba1].CurrentRegion.Delete xlShiftUp
LR = .[a65536].End(xlUp).Row
colDia = WorksheetFunction.Match(CInt(HOJA2.[k7]), .[a1:ag1], 0)
.[ba1] = .Cells(1, colDia).Value
.[bb1] = .[a1].Value
.[ba2] = "LA": .[ba3] = "F"
.Range(.[a1], .Cells(LR, "ag")).AdvancedFilter xlFilterCopy, .[ba1:ba3], .[bb1], False
If .[bb2] = "" Then GoTo Fin
End With

With HOJA2
LR = .[a65536].End(xlUp).Row
Set Rng = Union(.Range(.[E10], .Cells(LR, "E")), .Range(.[L10], .Cells(LR, "L")))

For Each C In Hoja1.Range(Hoja1.[bb2], Hoja1.[bb1].End(xlDown))
Set D = Rng.Find(What:=C, LookIn:=xlValues, LookAt:=xlWhole)
Do Until D Is Nothing
D.Resize(, 2).ClearContents
Set D = Rng.Find(What:=C, LookIn:=xlValues, LookAt:=xlWhole)
Loop
Next C
End With
Set Rng = Nothing

Fin:
Hoja1.[ba1].CurrentRegion.Delete xlShiftUp
Application.ScreenUpdating = True
End Sub
[/PHP]

*editado, gracias no sabia!!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

Privacy Policy