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.

Generar 12 hojas con los meses del año copiando desde la hoja "Plantilla"

publicado

Hola Excelianos y demás gentes de mal vivir:

Hoy me siento productivo, solo teneis que crear un libro con una hoja que se llame "Plantilla".

Como veo que es bastante corriente eso de generar una hoja por cada mes del año, cosa que no entiendo mucho el porqué, he decidido reañizar este aporte entre whisky y whisky.

Ejecutar la macro GenerarAño, y os creará 12 hojas con los meses del año iguales a la hoja "Plantilla", y si la cosa no os gusta como queda, modificar la hoja "Plantila", ejecutar la macro EliminarAño, y "begin de begin"

Hasta que la muerte nos separe. Lloraré mucho en vuestro entierro.

Eso si, "with love"

Macro

Sub GenerarAño(): On Error Resume NextDim Hojas()
Application.ScreenUpdating = False
Hojas = Array("Plantilla")
For x = 1 To 12
ReDim Hojas(x)
Hojas(x) = UCase(MonthName(x))
Sheets.Add after:=Sheets(Sheets.Count)
Sheets("Plantilla").Cells.Copy ActiveSheet.Cells
ActiveSheet.Name = Hojas(x)
Next
End Sub


Sub EliminarAño()
Application.DisplayAlerts = False
For x = Sheets.Count To 1 Step -1
If Sheets(x).Name <> "Plantilla" Then Sheets(Sheets.Count).Delete
Next
Application.DisplayAlerts = True
End Sub


[/CODE]

No pararé hasta conseguir que el senado me nombre[color=#006400][b] MVP SQPR[/b][/color]. ([font=arial][i][b]Most Valuous Professional [i]Senatus PopulusqueRomanus,)[/i] [/b][/i][/font]

Featured Replies

publicado

Por tocar un poquito las pelotillas.........que como sabes se me da medianamente bien.........en tu código te faltaría volver a poner el refresco de pantalla a True!!!!!.........jejejejeje......para que no se quede en plan "momificado".......

Y tienes mi voto para MVP de la temporada.......:devilish:

Chao,

Tese

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.