È soltanto un Pokémon con le armi o è un qualcosa di più? Vieni a parlarne su Award & Oscar!
 
Pagina precedente | 1 | Pagina successiva
Vota | Stampa | Notifica email    
Autore

Cerca con Macro

Ultimo Aggiornamento: 13/07/2017 19:09
Post: 1.471
Registrato il: 06/04/2013
Utente Veteran
2010
OFFLINE
13/07/2017 19:01

Ciao
...contento tu....
saluti

Sub xx()
Dim ToFind As Range, wFind As Range, cel As Range, rToFind As Long
Dim rD As Long, rE As Long, c As Object, firstAddress As String
rD = Range("D" & Rows.Count).End(xlUp).Row
rE = Range("E" & Rows.Count).End(xlUp).Row
If rD >= rE Then rToFind = rD Else rToFind = rE

Set ToFind = Range("D1:E" & rToFind)
Set wFind = Range("A:A")

For Each cel In ToFind
    If Not IsEmpty(cel.Value) Then
        With wFind
            Set c = .Find(cel.Value, LookIn:=xlValues, lookat:=xlWhole)
            If Not c Is Nothing Then
                firstAddress = c.Address
                Do
                    Range(c.Address).Interior.ColorIndex = 4
                    Set c = .FindNext(c)
                Loop While Not c Is Nothing And c.Address <> firstAddress
            End If
        End With
    End If
Next cel
Set ToFind = Nothing
Set wFind = Nothing
Set c = Nothing
End Sub


Domenico
Win 10 - Excel 2016
Vota:
Amministra Discussione: | Chiudi | Sposta | Cancella | Modifica | Notifica email Pagina precedente | 1 | Pagina successiva
Nuova Discussione
 | 
Rispondi
Cerca nel forum
Tag discussione
Discussioni Simili   [vedi tutte]
Feed | Forum | Bacheca | Album | Utenti | Cerca | Login | Registrati | Amministra
Tutti gli orari sono GMT+01:00. Adesso sono le 16:00. Versione: Stampabile | Mobile | Regolamento | Privacy
FreeForumZone [v.6.1] - Copyright © 2000-2024 FFZ srl - www.freeforumzone.com