Ver Mensaje Individual
  #13 (permalink)  
Antiguo 31/05/2007, 12:08
LANDA59
 
Fecha de Ingreso: abril-2007
Mensajes: 25
Antigüedad: 17 años
Puntos: 0
Re: Excel: Macro con la funcion de edicion/buscar

ESTO ES LO K ICE CON EL CODIGO, SOLO QUE SI ENCUENTRA EL PRIMER VALOR NO EJECUTA LAS INSTRUCCIONES DE LA PRIMERA BUSQUEDA, YA QUE SE VA A LA SIGUIENTE BUSQUEDA Y Y ME COPIA Y PEGA TANTO EN B1 COMO B2 EL DATO DEL UTIMO RESULTADO



Código:
Sub buscar()
    Dim n As Range
    
    Set n = Cells.Find(What:="110")
    If n Is Nothing Then
        MsgBox "No he encontrado nada. Lo siento."
    Else
        Range(n.Address).Select
        Selection.Copy
        Range("B1").Select
        ActiveSheet.Paste
        
    End If
    
    Set n = Cells.Find(What:="111")
    If n Is Nothing Then
        MsgBox "No he encontrado nada. Lo siento."
    Else
        Range(n.Address).Select
        Selection.Copy
        Range("B2").Select
        ActiveSheet.Paste
        
    End If
    Set n = Nothing
End Sub
tengo k repetir la busqueda con 20 datos mas y aun no me funciona con estos dos..
que me falta...

ya casi queda...

gracias de antemano