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 error 9

publicado

Hola, buenos dias, como estan?

Les comento que soy nuevo tanto en el foro como en el uso de Macros.

Mi inconveniente es este, tengo la siguiente Macro:

Sub Definitiva_Posta()

 Definitiva_Posta Macro

    Range("B1:B10").Select
    Selection.Copy Sheets("Hoja2").Select
    Range("A3").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
        :=False, Transpose:=True
    Rows("3:3").Select
    Application.CutCopyMode = False
    Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
    Sheets("Hoja1").Select
    Range("B2:B10").Select
    Selection.ClearContents
End Sub

Lo que debería hacer es, de la hoja asignación, copiar los valores de las celdas B1:B10 y pegar esos valores en la Hoja de Data. Pero al ejecutarlo me aparece el error 9 de Sub Indice fuera de rango.

Les adjunto el Link con el archivo por si les es de utilidad.

https://drive.google.com/open?id=1Pt1FxlFI2FSWAKkz7zmRfJ3QdQtdENrY

Desde ya muchas gracias y perdón por adelantado si cometí algún error de formato al publicar el tema.

Featured Replies

publicado

Prueba la macro:

Sub Definitiva_Posta()
'
' Definitiva_Posta Macro
'
    Application.ScreenUpdating = False
    Hoja1.Range("B1:B10").Copy
    Hoja2.Range("A3").PasteSpecial Paste:=xlPasteValues, Transpose:=True
    Hoja2.Rows(3).Insert Shift:=xlDown
    Hoja1.Range("B3:B10").ClearContents
    Application.CutCopyMode = False
    
End Sub

 

  • Gerson Pineda changed the title to Macro error 9

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.