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.

Listado copiando datos de todas las hojas

publicado

Buenos días,

Perdonad por si repito el post aunque he estado buscando y no he encontrado respuesta a mi duda y soy principiante en VBA.

Tengo un excel con muchas hojas y lo que quiero hacer es una macro para que en otra hoja llamada detalle me haga un listado con los siguientes campos de todas las hojas que tengo:

A1: Nombre hoja

B1: Nº Factura (celda C13 en todas las hojas)

C1: Fecha Factura (celda C14 en todas las hojas)

D1: Referencia (celda C15 en todas las hojas)

E1: Total Factura (celda J48 en todas las hojas)

.....

Muchas gracias.

Featured Replies

publicado
  • Autor

Hola de nuevo, se me ha ocurrido lo siguiente y funciona bien:

Sub NombresHojas()

Dim i As Integer

For i = 3 To Sheets.Count

Cells(i, 1).Value = Sheets(i).Name

Cells(i, 2).Value = Sheets(i).Range("C13")

Cells(i, 3).Value = Sheets(i).Range("C14")

Cells(i, 4).Value = Sheets(i).Range("C15")

Cells(i, 5).Value = Sheets(i).Range("F11")

Cells(i, 6).Value = Sheets(i).Range("J46")

Cells(i, 7).Value = Sheets(i).Range("J47")

Cells(i, 8).Value = Sheets(i).Range("J48")

Next i

End Sub

La duda que tengo ahora es cómo pongo que se rellene todo a partir de la línea 2 y en la línea 1 pongo los títulos fijos que yo quiera?

Titulos:

A1: Nombre Hoja

B1: Nº Factura

C1: Fecha Factura

D1: Referencia

E1: Cliente

F1: Base Imponible

G1: Impuesto

H1: Total Factura

????

Saludos y gracias!

publicado

Si subes tu libro con los resultados esperados es mas factible que recibas propuestas, ve las normas del foro.

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.