Jump to content

Macro para modificar


Recommended Posts

Hola @Dani2020 

Lo que pasa que estas confundiendo las variables, y eso hace que falle

Prueba esto, a ver como te va

Sub Modificar()

Set H1 = Sheets("CERTIFICACION")
Set H2 = Sheets("BD")

Set BD = H2.Columns("A").Find(H1.[C4], lookat:=xlWhole)

If H1.[C4] <> "" Then

If Not BD Is Nothing Then

Application.ScreenUpdating = False

    fi = BD.Row
    H2.Cells(fi, "B") = H1.[C6]
    H2.Cells(fi, "C") = H1.[C8]
    H2.Cells(fi, "D") = H1.[C10]
    H2.Cells(fi, "E") = H1.[C12]

Application.ScreenUpdating = True


    VBA.MsgBox "Nombre no encontrado", vbCritical, "AyudaExcel"

End If

End If

Set H1 = Nothing
Set H2 = Nothing
Set BD = Nothing

End Sub

Supongo que mi código es similar al @tierra_pampa


Saludos a ambos!

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...

Important Information

Privacy Policy