You are on page 1of 1

Dim valor As String, celda1 As String, celda2 As String Dim inicio As String, largo1 As String valor = InputBox("Ingrese Numero

") largo1 = Len(valor) Cells.Find(What:=valor, After:=ActiveCell, LookIn:=xlFormulas, LookAt:=xlPart, S earchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False, SearchFormat:=F alse).Activate celda1 = ActiveCell.Address celda2 = 0 Do While celda2 <> celda1 inicio = InStr(ActiveCell, valor) With Selection.Interior .ColorIndex = 6 .Pattern = xlSolid End With Cells.FindNext(After:=ActiveCell).Activate celda2 = ActiveCell.Address Loop End Sub

You might also like