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.

Copiar y pegar rango

publicado

Quiero copiar un rango de una hoja y pegarlo en otra, todo va bien hasta la instruccion paste, que da "error en el método paste de la clase Woksheet". Alguien me puede ayudar?

Gracias.

Sub CargaCCH2()

Dim dia1 As Date

Dim dia2 As Date

dia1 = #1/2/2013#

dia2 = #1/3/2013#

Worksheets("CHT").Select

uf = Range("a1000000").End(xlUp).Row

Set busco = ActiveSheet.Range("a1", "a" & uf).Find(dia1)

fi = busco.Row

Set busco = ActiveSheet.Range("a1", "a" & uf).Find(dia2)

ff = busco.Row

ff = ff + 23

Range("a" & fi, "d" & ff).Copy

Worksheets("CH").Activate

uf2 = Range("a1000000").End(xlUp).Row

Range("a1", "d" & uf2).ClearContents

Cells(1, 1).Select

ActiveSheet.Paste

Application.CutCopyMode = False

End Sub

Featured Replies

publicado

Prueba cambiando esa parte por esta otra

Selection.PasteSpecial Paste:=xlPasteAll

Si te ha sido de utilidad, un Like

Si se ha resuelto tu duda, indícalo

Saludos.

publicado
  • Autor

Me da "error en el metodo pastespecial de la clase range"

publicado

Prueba cambiando esto:

cells(1,1).select

ActiveSheet.Paste

por esto:

Range("A1").select

Selection.PasteSpecial Paste:=xlPasteAll

Si te ha sido de utilidad, un Like

Si se ha resuelto tu duda, indícalo

Saludos.

publicado
  • Autor

me da "error en el método PasteSpecial de la clase Range"

publicado
  • Autor

He probado comentando las líneas

'uf2 = Range("a1000000").End(xlUp).Row

'Range("a1", "d" & uf2).ClearContents

Cómo puedo borrar tres columnas enteras de otra manera?

Gracias

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.