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 para nombrar hojas.

publicado

Hola a todos buen dia.

Tengo una pregunta y un verdadero kilombo espero me puedan ayudar u apoyar, veran tengo una macro que genera varias hojas dentro de un libro lo que me gustaria hacer es que por cada hoja que exista en el libro me haga un libro nuevo, es decir si son 50 hojas dentro del libro, me genere 50 libros nuevos copiado dentro del libro la hoja que le pertenece y que el libro se guarde con el nombre de la hoja.

Estaba empezando con la macro pero la verdad me eh perdido loco!

Sub insert()
For i = 2 To Sheets.Count
Sheets(i).Select
If ActiveSheet.Name <> "PRINCIPAL" Then
Worksheets.Add

Else
End If
Next
End Sub

[/PHP]

Use la grabadora y me salio esto en la macro:

Sheets("Hoja1").Select

Application.CutCopyMode = False

Sheets("Hoja1").Copy

Pero como automatizar este proceso para cada hoja del libro.??

No se si me explico. Saludos y gracias a todos!!

Featured Replies

publicado

Hola:

Pruebe con esta macro:

Sub Generar()

For Each Hoja In ActiveWorkbook.Sheets
Hoja.Copy
ActiveWorkbook.SaveAs ThisWorkbook.Path & "\" & Hoja.Name & ".xlsx"
ActiveWorkbook.Close
Next


End Sub


[/CODE]

Saludos

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.