|
A tu servicio.
Algo que te puede servir:
Selecciona la columna donde deseas buscar el "valor1" y lulego ejecutas la macro.
Sub JHASDBF()
Dim CELDA As Range
Dim valor1 As String
Dim valor2 As String
Dim guia As Double
Dim coincidencia1 As Boolean
coincidencia1 = True
valor1 = InputBox("Valor buscado", "")
valor2 = InputBox("Valor adjuntado a Activecell.offset(0,-2)", "")
Set CELDA = Selection.Find(What:=valor1, LookAt:=xlWhole, SearchOrder:=xlByRows)
If Not CELDA Is Nothing Then
CELDA.Activate
Do
ActiveCell.Offset(0, -2) = valor2
If coincidencia1 And ActiveCell.Row <> guia Then
guia = ActiveCell.Row
coincidencia1 = False
End If
Selection.FindNext(After:=ActiveCell).Activate
Loop While ActiveCell.Row <> guia
End If
End Sub
Carlos L.
|