Modificar macro que copia datos de celdas de otra hoja por un enlace
Dante, buen día, he aquí tu macro.
Sub RecorrerHojas()
'Por.Dante Amor
col = "A"
ncol = Columns("A").Column
On Error Resume Next
For i = 2 To Range(col & Rows.Count).End(xlUp).Row
hoja = Cells(i, col)
existe = False
For Each h In Sheets
If h.Name = hoja Then
existe = True
Exit For
End If
Next
If existe Then
Cells(i, ncol + 1) = Sheets(hoja).[R20]
Cells(i, ncol + 2) = Sheets(hoja).[T20]
Else
Cells(i, ncol + 1) = "nombre de hoja no existe"
End If
Next
MsgBox "Terminado"
End SubMe puse a intentar de modificar la línea que dice Cells(i, ncol + 1) para que me hiciera una referencia estilo =Hoja1!A1 pero no doy con la solución.
1 respuesta
Respuesta de Dante Amor
1