Te anexo la macro para que la pongas en los eventos de la hoja llenado
Private Sub Worksheet_Change(ByVal Target As Range)
'Por.Dante Amor
If Not Intersect(Target, Range("B:B")) Is Nothing Then
Set h = Sheets("base")
Set b = h.Columns("B").Find(Target.Value, lookat:=xlWhole)
If Not b Is Nothing Then
Application.EnableEvents = False
Cells(Target.Row, "C") = h.Cells(b.Row, "C")
Cells(Target.Row, "D") = h.Cells(b.Row, "D")
Cells(Target.Row, "E") = h.Cells(b.Row, "E")
Application.EnableEvents = True
End If
End If
'
If Not Intersect(Target, Range("C:C")) Is Nothing Then
Set h = Sheets("base")
Set b = h.Columns("C").Find(Target.Value, lookat:=xlWhole)
If Not b Is Nothing Then
Application.EnableEvents = False
Cells(Target.Row, "B") = h.Cells(b.Row, "B")
Cells(Target.Row, "D") = h.Cells(b.Row, "D")
Cells(Target.Row, "E") = h.Cells(b.Row, "E")
Application.EnableEvents = True
End If
End If
End Sub
Sigue las Instrucciones para poner la macro en los eventos de worksheet
- Abre tu libro de excel
- Para abrir Vba-macros y poder pegar la macro, Presiona Alt + F11
- Del lado izquierdo dice: VBAProject, abajo dale doble click a worksheet(tu hoja)
- Del lado derecho copia la macro