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.

Traer datos de otra hoja a travez de un filtro

publicado

Hola a todos:

Estoy trabajando en un pequeño proyecto en la que por medio de una macro quiero traer los datos de una hoja llamado articulos.

Ejemplo:

Que me desgloce todos los codigos existentes por familia. Pero que la familia este unificada. es decir si en mi lista de articulos existen 20 familias diferentes las traiga todas.

Adjunto mi ejemplo y un pequeño avanze que con macro de autofiltro. Pero me trae una sola familia.

Lo que quiero es que me traiga todas las existentes

Vasos

Platos

Cubiertos y con cada uno sus codigos.

Gracias

MP

Inventariomo.xls

Featured Replies

publicado

Podrías incorporar la siguiente macro a un módulo común:

Sub InventarioPorFlia()
'-------------------
' By Cacho Rodríguez
''-------------------
Dim Q As Long

With Application: .ScreenUpdating = False: .EnableEvents = False: End With
If [b9] <> "" Then Range([b9], Cells(Rows.Count, "b").End(xlUp)).Resize(, 8).Delete xlShiftUp

With Worksheets("Articulos")
If .[b2] = "" Then GoTo Fin
.Range(.[b2], .Cells(Rows.Count, "b").End(xlUp)).Resize(, 4).Copy [b9]
End With

Q = Range([b9], [b8].End(xlDown)).Count

[b8:e8].Resize(1 + Q).Sort key1:=[b8], order1:=xlDescending, _
key2:=[d8], order2:=xlAscending, Header:=True

With [b9].Resize(Q)
.Copy [a9]: .Formula = "= if(a9=a8, """", a9)"
.Value = .Value: .Offset(, -1).ClearContents
End With

Fin:
With Application: .EnableEvents = True: .ScreenUpdating = True: End With
End Sub[/PHP]

y debes ejecutarla teniendo a la hoja 'Inventario' como hoja activa.

¿Te sirve la idea?...

Saludos, Cacho R.

publicado
  • Autor

Cacho:

Muchas gracias, lo he agregado a mi ejemplo. y funciona bien, voy a probar en mi archivo original y a ver que tal

Un saludo

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.