Para dante amor como incorporar una maro al código que ya existe

Dante en por mail te mando el archivo para que lo puedas ver mejor y no nos confundamos mil gracias

1 Respuesta

Respuesta
1

En cashflow, pusiste -26,250, ¿de dónde obtuviste ese importe?

El importe neto en bonos dice: 25,250, entonces no encuentro de dónde obtienes ese importe.

Perdón me equivoque es el importe neto 25250 como vos decís me confundí yo mil disculpas

Listo!

Te envié el archivo con la maco corregida:

Sub PegaDatosDeInteresesEnCashflow(f, filabono)
'Por.Dante Amor
    Dim fec As Date
    Set h1 = Sheets("INTERESES")
    Set h2 = Sheets("CASHFLOW")
    Set h3 = Sheets("BONOS")
    u = 5
    Do While h2.Cells(u, "A") <> ""
        u = u + 1
    Loop
    h2.Rows(u).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromRightOrBelow
    h2.Cells(u, "A") = h1.Cells(f, "A")
    h2.Cells(u, "B") = h1.Cells(f, "C")
    h2.Cells(u, "D") = h3.Cells(filabono, "R") * -1
    u = u + 1
    h2.Rows(u).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromRightOrBelow
    For i = f To h1.Range("A" & Rows.Count).End(xlUp).Row
        fec = DateSerial(Year(h1.Cells(i, "B")), Month(h1.Cells(i, "B")), 1)
        Set b = h2.Rows(2).Find(fec, LookIn:=xlFormulas)
        If Not b Is Nothing Then
            h2.Cells(u, "A") = h1.Cells(i, "A")
            h2.Cells(u, "B") = h1.Cells(i, "C")
            h2.Cells(u, b.Column) = h1.Cells(i, "D")
        End If
    Next
    h2.Select
    MsgBox "Datos archivado en el Cashflow", vbInformation
End Sub

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas