Bienvenido a la mayor comunidad de usuarios EXCEL

Regístrate gratis ahora para ver contenidos y descargas sin restricciones!

Regístrate gratis

Copiar filas de varias hojas que cumplen una condición en otra hoja

  • Autor del tema Autor del tema RafaR
  • Fecha de inicio Fecha de inicio

RafaR

New member
Registrado
14 Abr 2023
Mensajes
4
Muy buenas, llevo tiempo intentando hacer esto con fórmulas y no soy capaz... Con macros creo que si se podría hacer, pero estoy más que verde. A ver si alguien me puede echar una mano:

Tengo un...
Para poder visualizar el resto de este tema y sus adjuntos:
. Si nunca te has registrado puedes registrarte gratis aquí
. Si ya te has registrado debes
iniciar sesión aquí
 
Solución
Prueba esta macro:
Código:
Sub Resumen()
Dim TR As Object, Hoja As Worksheet
'--
Application.ScreenUpdating = False
Set TR = Sheets("RESUMEN").Range("B4").ListObject
TR.DataBodyRange.Delete
For Each Hoja In Sheets
   If Not Hoja.Name = "RESUMEN" Then
      With Hoja.Range("B4").ListObject
         For x = 1 To .ListRows.Count
            If Not .DataBodyRange(x, 4) = "" Then
               TR.ListRows.Add
               TR.ListRows(TR.ListRows.Count).Range.Value = .ListRows(x).Range.Value
            End If
         Next
      End With
   End If
Next
End Sub
Prueba esta macro:
Código:
Sub Resumen()
Dim TR As Object, Hoja As Worksheet
'--
Application.ScreenUpdating = False
Set TR = Sheets("RESUMEN").Range("B4").ListObject
TR.DataBodyRange.Delete
For...
Para poder visualizar el resto de este tema y sus adjuntos:
. Si nunca te has registrado puedes registrarte gratis aquí
. Si ya te has registrado debes
iniciar sesión aquí
 
  • Me gusta
Reacciones: FGV
Volver
Arriba