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 datos de otro libro solamente cambiando la variable

publicado

Hola Buenas

Agradecería mucho su ayuda

Busco copiar datos de un libro a otro,  en este caso se llama [Exhibit Esc1.xlsx]1. Mina (Nombre de libro y pestaña) 

La problemática surge que son muchas celdas las que debo copiar y lo debo hacer con varios libros diferentes, entonces debo cambiar esa dirección de origen en todo. Mi idea es dar un valor de variable a la dirección de origen para luego solamente cambiar la variable.

Dejo un ejemplo de como me funciona y lo que quiero hacer

Saludos

 

Funciona así:

Sub Report2()
    Range("D22").Select
    ActiveCell.FormulaR1C1 = "=SUM('[Exhibit Esc1.xlsx]1. Mina'!R21C5:R21C7)"
    Range("E22").Select
End Sub

 

Quiero esto:

Sub Report2()
    Dim Ex As String                                             
    Ex = "[Exhibit Esc1.xlsx]1. Mina"                 ------> La idea es luego cambiar solamente este nombre de la variable para realizar el mismo procedimiento con otros libros

    Range("D22").Select
    ActiveCell.FormulaR1C1 = "=SUM('[Exhibit Esc1.xlsx]1. Mina'!R21C5:R21C7)"
    Range("E22").Select
    
End Sub

Editado el por David_09

Featured Replies

publicado
Sub Report2()
   Dim Ex As String
   Ex = "[Exhibit Esc1.xlsx]1. Mina"
   Range("D22").FormulaR1C1 = "=SUM('" & Ex & "'!R21C5:R21C7)"
   Range("E22").Select
End Sub

 

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.