Hola!! Necesito unir tablas de distintas hojas de calculo y crear una nueva hoja, para esto he estado utilizando la siguiente macro (Adjunta) pero me entrega los valores que estan en la celda con formula y los necesito solo como valores. ¿Que puedo hacer en este caso? ¿Qué me recomiendan?
Sub Extraer_Datos()
Dim shDestino As Worksheet
Dim ufo As Integer, ufd As Integer
Set shDestino = Worksheets.Add(After:=Sheets(Sheets.Count))
shDestino.Name = "d"
For I = 1 To Sheets.Count - 1
If Sheets(I).Name = "ESCUELAS" Then
Else
ufo = Sheets(I).Range("A" & Cells.Rows.CountLarge).End(xlUp).Row
ufd = shDestino.Range("A" & Cells.Rows.Values).End(xlUp).Row
Sheets(I).Range("AA2:AJ" & ufo).Copy shDestino.Range("A" & ufd)
End If
Next I
End Sub
Featured Replies
Archivado
Este tema está ahora archivado y está cerrado a más respuestas.
Hola!! Necesito unir tablas de distintas hojas de calculo y crear una nueva hoja, para esto he estado utilizando la siguiente macro (Adjunta) pero me entrega los valores que estan en la celda con formula y los necesito solo como valores. ¿Que puedo hacer en este caso? ¿Qué me recomiendan?
Sub Extraer_Datos()
Dim shDestino As Worksheet
Dim ufo As Integer, ufd As Integer
Set shDestino = Worksheets.Add(After:=Sheets(Sheets.Count))
shDestino.Name = "d"
For I = 1 To Sheets.Count - 1
If Sheets(I).Name = "ESCUELAS" Then
Else
ufo = Sheets(I).Range("A" & Cells.Rows.CountLarge).End(xlUp).Row
ufd = shDestino.Range("A" & Cells.Rows.Values).End(xlUp).Row
Sheets(I).Range("AA2:AJ" & ufo).Copy shDestino.Range("A" & ufd)
End If
Next I
End Sub