Question VBA Sub paste within sub paste VBA

0

I am working on a macro to copy and paste data into a table and into the blank cell that is available consecutively. However, there is data in another sheet that I want you to paste the data after the first SUB that ran.

I mean I want you to paste data after the data pasted into the next blank cell available.

I have the following code but I still do not know what to modify:

Sub ActualizarFondos()    
    Dim i As Integer

    'Deuda
    J = 12
    For i = 15 To 26
        'Sheets("Reporte").Activate
        With Sheets("Reporte")
        If Cells(i, "C").Value > 0 Then
            .Range(.Cells(i, "C"), .Cells(i, "B")).Copy
            ThisWorkbook.Sheets("Reporte").Range("Z" & J).PasteSpecial Paste:=xlPasteValues

            Call ESTDEUDA(i)
            J = J + 1
        End If
        End With
    Next
End Sub

Sub ESTDEUDA(i As Integer)    
    Dim x As Long    
    For x = 3 To 6
        With Sheets("FondosEstrategia")
        If Cells(x, "F").Value > 0 Then
            .Range(.Cells(x, "E"), .Cells(x, "F")).Copy
            Sheets("Reporte").Range("Z" & J).PasteSpecial Paste:=xlPasteValues
        End If
        End With
    Next x
End Sub

I hope my explanation was clear.

Thank you very much!

    
asked by Alejandro Montiel 20.07.2018 в 18:39
source

0 answers