Te anexo la macro para obtener los datos de la fila
Sub TraerDatos()
'Por.Dante Amor
Set h1 = Sheets("Hoja4")
Set h2 = Sheets("Respaldo1")
'
i = 10
Do While Cells(i, "B") <> "" Or Cells(i + 1, "B") <> ""
i = i + 2
Loop
'
Set b = h2.Columns("B").Find(h1.[T3], lookat:=xlWhole, LookIn:=xlValues)
If Not b Is Nothing Then
h1.Cells(i, "B") = h2.Cells(b.Row, "C") 'Orden de compra
h1.Cells(i, "C") = h2.Cells(b.Row, "D") 'Cons
h1.Cells(i, "D") = h2.Cells(b.Row, "E") 'Rda
h1.Cells(i, "E") = h2.Cells(b.Row, "F") 'Ent
h1.Cells(i + 1, "I") = h2.Cells(b.Row, "G") 'cantidad
'h1.Cells(i+1, "J") = h2.Cells(b.Row, "C") 'unidad
h1.Cells(i + 1, "L") = h2.Cells(b.Row, "H") 'Fecha
h1.Cells(i + 1, "N") = h2.Cells(b.Row, "I") 'Precio
h1.Cells(i, "P") = h2.Cells(b.Row, "J") 'Factura
h1.Cells(i, "Q") = h2.Cells(b.Row, "K") 'Lote
Else
MsgBox "Número de folio no existe", vbExclamation
End If
End Sub
Sub TraerDatos2()
'Por.Dante Amor
Set h1 = Sheets("Hoja4")
Set h2 = Sheets("Respaldo1")
h1.Unprotect "abc"
'
i = 10
Do While Cells(i, "B") <> "" Or Cells(i + 1, "B") <> ""
i = i + 2
Loop
'
Set b = h2.Columns("B").Find(h1.[T3], lookat:=xlWhole, LookIn:=xlValues)
If Not b Is Nothing Then
h1.Cells(i, "B") = h2.Cells(b.Row, "C") 'Orden de compra
h1.Cells(i, "C") = h2.Cells(b.Row, "D") 'Cons
h1.Cells(i, "D") = h2.Cells(b.Row, "E") 'Rda
h1.Cells(i, "E") = h2.Cells(b.Row, "F") 'Ent
h1.Cells(i + 1, "I") = h2.Cells(b.Row, "G") 'cantidad
'h1.Cells(i+1, "J") = h2.Cells(b.Row, "C") 'unidad
h1.Cells(i + 1, "L") = h2.Cells(b.Row, "H") 'Fecha
h1.Cells(i + 1, "N") = h2.Cells(b.Row, "I") 'Precio
h1.Cells(i, "P") = h2.Cells(b.Row, "J") 'Factura
h1.Cells(i, "Q") = h2.Cells(b.Row, "K") 'Lote
Else
MsgBox "Número de folio no existe", vbExclamation
End If
h1.Protect "abc"
End Sub
Saludos.Dante Amor