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.

Filtro en Macro

publicado

Filtro en Macro (Tabla Dinámica)

Estimados,

Tengo parte una programación en la que necesito su ayuda.

----

ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _

Worksheets("Hoja1") _

.Range("A1:AF" & Sheets("Hoja1").Range("AF1").End(xlDown).Row).Address(External:=True)) _

.CreatePivotTable TableDestination:="", TableName:= _

"Tabla dinámica1", DefaultVersion:=xlPivotTableVersion10

With ActiveSheet.PivotTables("Tabla dinámica1").PivotFields("Incoterm")

.Orientation = xlPageField

.Position = 1

End With

ActiveSheet.PivotTables("Tabla dinámica1").PivotFields("Incoterm").CurrentPage _

= "(All)"

With ActiveSheet.PivotTables("Tabla dinámica1").PivotFields("Incoterm")

.PivotItems("C I F").Visible = False

.PivotItems("C. Y F.").Visible = False

End With

-------

El problema es que si por ejemplo "C I F" no está dentro de los datos, la macro al no encontrar esto se detiene.

Quizá puedo poner una condición "ó"?

Dejo archivo de ejmeplo

(debo agregar más datos para eliminarlos en el filtro)

[ATTACH]37365.vB[/ATTACH]

Libro2.rar

Featured Replies

No hay posts para mostrar

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.