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.

Macro con dos tablas dinámicas en una hoja

publicado

Buen día, espero me puedan ayudar.

Recién estoy empezando con las Macros, grabe una macro para realizar un reporte con 2 tablas dinámicas de diferentes base de datos en una misma hoja, para que la macro me corriera le elimine el nombre de la hoja, dejándolo en blanco (TableDestination:=""), y la tabla dinámica la renombre para que me ponga una en especifico (TableName:=Crédito ACI By DCH y TableName:=Contado ACI By DCH).

La macro corre sin problemas pero en vez de crearme el reporte en una misma hoja, me crea 2 hojas diferentes. Pienso que el error esta al momento de crear la 2da tabla dinámica que en el nombre de la hoja no le pongo un nombre en especifico por eso me crea otra hoja diferente a la primer tabla ya que le dejo igual (TableDestination:=""), quiero que la siguiente tabla dinámica la inserte en el Rango "E1"

Anexo Macro y espero me puedan ayudar, de antemano agradezco la ayuda!

Sub FLUJOACISA()

'

' FLUJOACISA Macro

'

'

ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:="CXP" _

, Version:=xlPivotTableVersion10).CreatePivotTable TableDestination:= _

"", TableName:="Crédito ACI By DCH", DefaultVersion:= _

xlPivotTableVersion10

ActiveWorkbook.ShowPivotTableFieldList = True

With ActiveSheet.PivotTables("Crédito ACI By DCH").PivotFields("PROVEEDOR")

.Orientation = xlRowField

.Position = 1

End With

Range("E1").Select

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

"SOLICAFA", Version:=xlPivotTableVersion10).CreatePivotTable _

TableDestination:="", TableName:="Contado ACI By DCH", _

DefaultVersion:=xlPivotTableVersion10[/color]

With ActiveSheet.PivotTables("Contado ACI By DCH").PivotFields("PROVEEDOR")

.Orientation = xlRowField

.Position = 1

End With

Application.PrintCommunication = True

ActiveSheet.Name = "FLUJO ACI"

End Sub

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.