Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

modificar macro que en lugar de borrar contenido lo pinte.

publicado

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!!

Featured Replies

publicado

Hola juanpl206

Revisa el enlace donde se explica cómo colgar códigos VBA en el Foro.

Envolver fórmulas y códigos con etiquetas en los mensajes

Saludos

Lázaro.

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.