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 copiar celdas entre varias hojas

publicado

Estimados

Estoy recien aprendiendo e intentando  crear macros en VB,pero esta vez necesito por favor ayuda... 

Debo crear lo siguiente:

1. Crear una macro que tome las primeras 10 celdas de la hoja 1 y las copie en la segunda hoja a partir de A1

2. Crear  una macro que tome de la celda 11 en adelante y la copie a una tercera hoja a partir de A1

Este es el codigo que intente hacer pero no me resulta el traspaso a la tercera hoja

Public Sub traspasohoja2()

Sheets("hoja1").Select
Dim i As Integer
 For i = 1 To 10
 Cells(i, 1).Select
 Selection.Copy
 Sheets("hoja2").Select
 Cells(i, 1).Select
 ActiveSheet.Paste
 Sheets("hoja1").Select
 
 Next i
 
End Sub
 

 

Ojala me puedan ayudar

Y muchas gracias por la ayuda que en este magnifico foro todos aportan

 

saludos

Meggido

 

traspaso.xlsm

Featured Replies

publicado

No es necesario seleccionar los datos origen y destino en una copia.

Sub TraspasoHoja2Y3()
Dim uf As Long 'Entero largo

'Ultima fila de la hoja "Hoja1"
uf = Sheets("Hoja1").Range("A" & Rows.Count).End(xlUp).Row

'Copiamos rango A1:A10 de la hoja "Hoja1" a la hoja "Hoja2"
Sheets("Hoja1").Range("A1:A10").Copy Sheets("Hoja2").Range("A1")

'Copiamos rango A11 hata el final de la hoja "Hoja1" a la hoja "Hoja3"
Sheets("Hoja1").Range("A11:A" & uf).Copy Sheets("Hoja3").Range("A1")

End Sub

 

  • Silvia bloqueó este tema

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.