concatenar celdas con la macro

1 post / 0 nuevos
tetorin
Imagen de tetorin
Offline
última acción: Hace 6 meses 3 semanas
Nivel 1 - 200 puntosNivel 2 - 500 puntosNivel 3 - 1000 puntosNivel 4 - 2000 puntos
alta: 26/05/2011 - 02:57
Puntos: 3262
concatenar celdas con la macro

Buen dia

en esta macro se copia los datos de 3 celdas --Range("A27:A29")--pero al colpiarlas ala hoja destino me pone la copia en celdas separadas,

Como podria hacerle para que me ponga la informacion de estas 3 celdas Range("A27:A29")--en una sola celda de la hoja destino

 

saludos...

 

Sub Copy_ACC_DEF_PREV()
    Dim SourceRange As Range, DestRange As Range
    Dim DestSheet As Worksheet, Lr As Long
               
    With Application
        .ScreenUpdating = False
        .EnableEvents = False
    End With
               
    'fill in the Source Sheet and range
    Set SourceRange = Sheets("PPS Format Back").Range("A27:A29")
               
    'Fill in the destination sheet and call the LastRow
    'function to find the last row
    Set DestSheet = Sheets("BASE DE DATOS")
    'Lr = LastRow(DestSheet)
     Lr = DestSheet.Cells(Rows.Count, "J").End(xlUp).Row
               
    'With the information from the LastRow function we can
    'create a destination cell and copy/paste the source range
    Set DestRange = DestSheet.Range("J" & Lr + 1)
    SourceRange.Copy DestRange
               
    With Application
        .ScreenUpdating = True
        .EnableEvents = True
    End With
               
End Sub

Etiquetas: